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
Define aop(assepct oriented programing)?
What is ioc concept & explain it?
What is the difference between ear, jar and war file?
What is bean? Where can it be used?
Do you think that java should have had pointers?
What is the purpose of the wait() method?
How is a java object message delivered to a non-java client?
Explain the advantages and disadvantages of detached objects.
What is jboss?
Difference between DurableSubscription and non- DurableSubscription?
AS a developer will u create a data source in connection pool? If so how will u do that, how to access the object from connection pool using IRAD tool?
what is the use of State Factories?
What restrictions are placed on the values of each case of a switch statement?
Is the ternary operator written x : y ? Z or x ? Y : z ?
how to use debug in my elipse to solve problems that exist in my project