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 u give some realtime example in ploymorphism? and
inheritance?

Answer Posted / suresh

inheritance is hierarchy of class,that is one class derived
from another class

example:
grant father
--father
--son

polymorphism is the ability to take more than one form

example:
compile time polymorphism
--method overloading
people can act many role in the world
home:father
company:employee
run time polymorphism
--method overriding
dog is a class
It contains smile method

Is This Answer Correct ?    36 Yes 15 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What’s the difference between forward() and sendredirect() methods?

1067


What is the use of servlet wrapper classes?

1241


Is servlet a framework?

1096


What are advantages of servlets over cgi?

1163


How do we translate jsp?

1110


How do you configure a centralized error handler in servlets?

1155


What are the life cycle methods of the servlet?

1132


What is war file?

1173


Explain servlet life cycle?

1188


Why jsp is better than servlet?

1081


How to get the IP address of client in servlet?

1134


How many objects of a servlet is created?

1318


What is the life cycle of a servlet?

1615


Should I override the service() method?

1143


What's the advantages using servlets than using cgi?

1047