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

Which javutil classes and interfaces support event handling?

1100


What you mean by COM and DCOM?

1111


What is the diffrence between a local-tx-datasource and a xa-datasource?

1101


whats is statement and procedure

2288


How will you pass parameters in RMI? Why do you serialize?

1310


what are RemoteObjects?

2787


What is the RMI and Socket?

1095


Is the session factory thread safe?

1230


What is bean? Where can it be used?

1241


How a component can be placed on Windows?

2912


What are the different algorithms used for clustering?

1128


How primary key is implemented in Oracle?

2494


How are the elements of a borderlayout organized?

1166


What are the different approaches to represent an inheritance hierarchy?

1113


Can constructors be synchronized in java?

1170