can a static method be overridden
Answer Posted / narasimha rao bodagala
Hi rama devi,u are written the answer is ok but not clear
i given one example of this
what i am saying is the static methods are not overriden
cause the class loader will load the while loading the
class at runtime so the compiler will check the which
static method would i need to call co its confused thas's
why the static methods are not overriden.
EXAMPLE:
class A {
static void something () {}
}
class B extends A {
static void something () {}
}
....
A anA = new B ();
anA.something ();
think and compile what's the comipler say's.
| Is This Answer Correct ? | 18 Yes | 9 No |
Post New Answer View All Answers
What is a clone?
How messaging services are done, before release of JMS?
Why do threads block on i/o?
What is the purpose of the wait(), notify(), and notifyall() methods?
Explain the steps in details to load the server object dynamically?
What classes of exceptions may be caught by a catch clause?
What are JTA/JTS and how they used by client?
What are the different class loaders used by jvm?
What is the difference between the session.get() method and the session.load() method?
what are memory considerations of jsp compares to other web components?
How to implement RMI in Java?
Name three subclasses of the component class?
Why is actionform a base class rather than an interface?
What is the relationship between the canvas class and the graphics class?
what is a non-repeatable read?