+ 5
Why static method is not overridden in JAVA?
4 odpowiedzi
+ 3
@Sayan... This is one of those questions where you can piece the answer together and at make a speculation on the reason.
Consider what you might know:
- What do you know that can be overridden?
- Where is the overridden function implemented?
Now, based on what you know, are there any fundamental challenges you can think of that would prohibit static methods from being overridden?
My intent in taking this Socratic approach, by leading you to the answer via a series of questions, is to empower you to connect the dots and reach a conclusion on your own.
This won't work on every scenerio. However, by attempting this approach on your own, not only will you understand so much more, you will significantly accelerate your rate of learning.
If this approach fails, you could always search on Google first before finally posting a question here.
Just some food for thought. 🙄
+ 2
I give a specifier ans..
1.-->
static method can not be overriding..
that it call..
"function hiding"..
2.-->
as we know that static never be a part of object..
but still we can call static method by object..
I given you a way to achieve function overriding..
in so many way
Hope you like it
https://www.sololearn.com/discuss/1178542/?ref=app