posted 20 years ago
" If a class declares a static method, then the declaration of that method is said to
hide any and all methods with the same signature in the superclasses and superinterfaces
of the class that would otherwise be accessible to code in the class. A
compile-time error occurs if a static method hides an instance method. "
This is taken from JLS 8.4.6.2 .
What does the author mean by hiding of all the methods with same signature in the superinterfaces?
How can u write a static method that can hide an interface method? Does he mean to say you can implement an interface method by a static method in a class (not possible right.....)?
Could someone please clarify this?
thank you,
Saravanakumar R