can a static method be overridden

Answer Posted / narasimha rao bodagala

Example:
class A {
static void something () {}
}

class B extends A {
static void something () {}
}

....
A anA = new B ();
anA.something ();

so, the compiler will not check the which one is to create
or which one is called method.

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between a static and a non-static inner class?

586


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 ..

1721


Are we allowed to change the transaction isolation property in middle of a transaction?

552


What is permgen or permanent generation?

575


How primary key is implemented in Oracle?

1898






hi friends, i have done my BE(CSE)at 2011 then i have joined one company before they asked me 50k so i paid but now they telling no project here so we r going to close like that so now i need any job i have good knowledge in core java and j2ee(jsp,servlet,jdbc) so if u know any job pl help me

1770


Which javutil classes and interfaces support event handling?

569


What is the infobus?

599


What is an abstract method?

581


What is re-entrant. Is session beans reentrant. Is entity beans reentrant?

568


What is a class loader?

574


Name the eight primitive java types.

584


Why are some of the class and element names counter-intuitive?

557


Can we sent objects using Sockets?

635


Why won’t the jvm terminate when I close all the application windows?

742