State true or false : All methods of an interface are implicitly public, static, and final.
I think that it is false because if interface methods are final then they cannot be overriden. Also, it is not necessary for all the methods to be static.
Sam Zheng
Ranch Hand
Joined: Nov 29, 2000
Posts: 61
posted
0
It is false. All interface methods are implicitly public and abstract (but not static!), while member variables in interface are implicitly public static and final. In fact in the exam I took last month, there was actually one question asking these fine points.
Samrat Pujara
Greenhorn
Joined: Jan 06, 2001
Posts: 7
posted
0
Methods of an Interface can't be final otherwise the class which extends the Interface won't be able to use the method and the purpose of Interface would be defeated. Therefore , methods are public so that they are available everywhere These methods are also abstract.
Arvind Kini
Ranch Hand
Joined: Dec 28, 2000
Posts: 31
posted
0
yeah thats right method of an interface cannot be final . I had come across this question in one of javeds chapter wise mock exams. there were many more of such wrong answers there . but then those were obvious wrong ones!! regards arvind