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 / karthik narayanan

also when you implement the same static method, in both
parent and subclass , and if you an instance of subclass and
say if your instance.thatstaticMethod(), the subclass
version will execute, but now if you typecast subclass to
the parent class and then execute
parentInstance.thestaticMethod() the parents version will
execute. this is different from overriding where even if
you typecast , the subclass version of the method will
execute. So basically, you can hide a static method
execution from a subclass, but you cannot override it.
understand???

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is aop(assepct oriented programing)?

1121


What is the highest-level event class of the event-delegation model?

1163


What method is invoked to cause an object to begin executing as a separate thread?

1094


what is an isolation level?

2799


What is the immediate superclass of the applet class?

1137


What is the purpose of the notifyall() method?

1093


Explain about local interfaces.

1120


Difference between swing and awt?

1387


What is TL and its use?

2548


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

1162


What is glasgow?

1111


Java is fully object oriented languages or not?

1074


What is a modular application? What does module-relative mean?

1122


Is the session factory thread safe?

1233


A user of a web application sees a jsessionid argument in the URL whenever a resource is accessed. What does this mean? a. The form must have the field jsessionid b. URL rewriting is used as the session method c. Cookies are used for managing sessions

2300