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
how do you Handle Front End Application data against DB with example?
What is a session? Can you share a session object between different theads?
Difference between hashmap and hashtable?
What is ripple effect?
Java is fully object oriented languages or not?
what is the use of State Factories?
What are JTA/JTS and how they used by client?
What is the difference between system.out ,system.err and system.in?
What do you mean by Socket Programming?
Why are component architectures useful?
What is the difference between the font and fontmetrics classes?
what is Activation Instantinator?
When is the best time to validate input?
How substring() method of string class create memory leaks?
Why a component architecture for the java platform?