This week's book giveaway is in the OCAJP forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line! See this thread for details.
Mansukhdeep Thind wrote: . . . . Also, interfaces are by default abstract. . . .
the compiler considers it as
Are you sure about that?The word abstract has vanished from the interface. Did you see that anywhere in the JLS?
It can be dubious design to put constants into interfaces, as you can see here. It is probably better to put those constants into an uninstantiable class.And to answer the original question: you always miss out modifiers in interfaces, so you simply writeIn fact, when you are writing interfaces, the biggest and mostest parts of the interface are the documentation comments