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


Please Help Members By Posting Answers For Below Questions

How to implement RMI in Java?

2393


Should synchronization primitives be used on bean methods?

542


What do you need to set-up a cluster with jboss?

566


Which container method is used to cause a container to be laid out and redisplayed?

657


How many times may an objects finalize() method be invoked by the garbage collector?

665






How task's priority is used in scheduling?

1771


What is bean? Where can it be used?

573


What is ioc concept & explain it?

606


How substring() method of string class create memory leaks?

542


What is Remote Server?

1678


Where can I find seam examples and documentation?

559


What class is used to create Server side object ?

1658


difference between  ejb,struts,hibernate,spring and jsp

2289


What are the diff types of exception?

547


What is a modular application?

577