Sai Prakash wrote:Hi,
I hope that every knows,In java interfaces by Default,
1)All methods are public and abstract.
2)Variables are public,static and final.
Why is it like that ? any specific reason ?
if you dont want all methods to be abstract, use an abstract class instead of an interface,
By the way, using an interface marks a class of having the same characteristic as that of the interface,
Hence its essential for the methods to be public,
Eg:
Can you create an Object of an interface ???
If not, then what is the sense of Not keeping variables final ?