can u give some realtime example in ploymorphism? and
inheritance?

Answer Posted / sai vamsi krishna

An Inheritance is to access the properties from super class to sub class.
example father to son sometmes the father has some diseases like sugar,BP those are attacking to son also.
poymorphism means many forms
example one person acts as many roles in his life a person works at company he is a employee at the same time he is a father of his son.

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How does java thread pool work?

778


Can a jsp be called using a servlet?

788


What are the supporting protocol by HttpServlet ?

864


What if we pass negative value in load-on-startup?

1035


What are all the ways for session tracking?

822


Difference between doget and dopost?

908


Tell the new features added in servletrequest interface i.e. Servlet 2.4

819


What are the steps that are involved in using the httpservlet class?

834


How do I use cookies to store session state on the client?

729


What are sessions in servlets?

787


What is the GenericServlet class?

865


What is the purpose of inter-servlet communication?

798


How do you run a servlet?

775


What is the use of servlet wrapper classes?

888


What is the difference between a generic servlet and http servlet?

720