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
Name the eight primitive java types.
How database connectivity in XML is achieved?
What is the highest-level event class of the event-delegation model?
Explain what is synchronization?
what are RemoteObjects?
What is difference between object state and behavior?
What is re-entrant. Is session beans reentrant. Is entity beans reentrant?
What is a class loader?
Is the session factory thread safe?
What are transaction attributes?
What is the purpose of the notify() method?
What are the sequence of steps to write pub or sub model kind of application?
Why is string immutable in java?
Define aop(assepct oriented programing)?
cud u help me ... i am struggling with this question... to find all the subsets of a given set for ex.... a,,b,c shud give all the subsets.... i gt the program in c bt nt able to get it in java..... help needed ..