| Author |
Can we override static method
|
Pawan M
Greenhorn
Joined: Feb 23, 2008
Posts: 3
|
|
Hi, I was reading queries posted by other so i got one doubt due to following sentences that "You can "override" a non-final static method, although this is actually redefining it and hiding the original method." but what i know that we can not override static method. Am i correct or not,please clear my doubt? i have also created one program but i am getting output-Overriden Meth but in case of overriding it should print- Overriding Meth
|
 |
Ravikanth kolli
Ranch Hand
Joined: Feb 10, 2008
Posts: 179
|
|
Static method cannot be overridden in java. Detailed explanation is given at Overriding Vs Hiding Thanks hope that helps
|
-kolli
|
 |
Pawan M
Greenhorn
Joined: Feb 23, 2008
Posts: 3
|
|
Thank You very much. Now i understood.
|
 |
Campbell Ritchie
Sheriff
Joined: Oct 13, 2005
Posts: 26710
|
|
|
Welcome to the Ranch, "Pawan M," but please alter your displayed name to conform to the Ranch naming policy.
|
 |
Latif Khan
Greenhorn
Joined: Feb 08, 2012
Posts: 3
|
|
Ravikanth kolli wrote:Static method cannot be overridden in java.
Detailed explanation is given at
Overriding Vs Hiding
Thanks
hope that helps
thank you very much
|
 |
 |
|
|
subject: Can we override static method
|
|
|