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
How to implement RMI in Java?
Should synchronization primitives be used on bean methods?
What do you need to set-up a cluster with jboss?
Which container method is used to cause a container to be laid out and redisplayed?
How many times may an objects finalize() method be invoked by the garbage collector?
How task's priority is used in scheduling?
What is bean? Where can it be used?
What is ioc concept & explain it?
How substring() method of string class create memory leaks?
What is Remote Server?
Where can I find seam examples and documentation?
What class is used to create Server side object ?
difference between ejb,struts,hibernate,spring and jsp
What are the diff types of exception?
What is a modular application?