You put it in Entity(ItemName) without the "()" and ItemName is your item's name.
*Item, not entity
Here's a simpler explanation: you create a class called ItemLightningSword or whatever. You can just copy the code from ItemSword and add in the lines of code you put in your post. Then in the mod_whatever file, in the line of code
public static final Item lightningSword = new ItemSword(Item ID, Texture Index).setItemName("lightning sword");
Just replace ItemSword with the name of your new class file.
Don't mind Shaun, by the way. We were all noobs once