can a static method be overridden
Answer Posted / karthik narayanan
Basically there are two concepts, one is overriding and the
other is hiding. When a subclass implements the same static
method as its parent class, then subclass will basically
hide the parents static implementation. So when you call
subclasses static method, only subclass method will get
executed. To execute the parents static method you have to
explicitly call it. But with instance method, you can hide
as well override the parent implementation, override in the
sense you can call the parent implementation by
super.dosamemethod()...
Hopefully this clears the debate..
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Can I map more than one table in a cmp?
How would you reatach detached objects to a session when the same object has already been loaded into the session?
What is aop(assepct oriented programing)?
what is meant by JRMP?
What is the difference between RMI registry and OS Agent?
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 ..
What is the relation between the infobus and rmi?
Which are the different segments of memory?
Describe, in general, how java's garbage collector works?
Is infobus easy to use?
Why use a datasource when you can directly specify a connection details? (in a J2EE application)
Is the ternary operator written x : y ? Z or x ? Y : z ?
Explain how will the struts know which action class to call when you submit a form?
which type of objects reference will be given to client?
What are the oops concept?