Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

can a static method be overridden

Answer Posted / kiran kadarla

Static methods CANNOT be overridden as they belong to a
class and not an instance of the class.

Aswini De: First of all, you didnot override the cal method.

Karteek: In your example, the fact that
parent.mystaticMethod and child.mystaticmethod are printing
different answers is in itslef an indication that the method
is not overridden!!

-kk

Is This Answer Correct ?    9 Yes 9 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the purpose of the notifyall() method?

1093


Write a singleton program?

1110


What is a class loader? What are the different class loaders used by jvm?

1160


What is RMI and what are the services in RMI?

1252


What is the purpose of the wait() method?

1289


What class is used to create Server side object ?

2317


Define prototype?

1127


How would you create a button with rounded edges?

1244


Do I have to use jsps with my application?

1071


What is the difference between system.out ,system.err and system.in?

1164


Is the session factory thread safe?

1237


How database connectivity in XML is achieved?

2288


Why doesn’t the focus feature on the tag work in every circumstance?

1173


what are getters and setters in Java with examples?

1835


what are the advantages of JTA over JTS?

2292