explain the concept of inheritance with an example?

Answer Posted / muthusenthil

Inheritance is a process by which an object inherits parent
object quality.inheritance gives reusability
Consider a class Man derived class of Monkey an object of
man inherits some of monkeys qualities and overrides some
qualities like walking straight with two legs and have
additional functions like speach etc..

Is This Answer Correct ?    29 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Give a brief description of java socket programming?

529


Where are local variables stored?

512


what is synchronization? : Java thread

563


What is reverse function?

576


how to run ecllipse with jettyserver for windows environment using batch file

1496






What are runtime exceptions?

618


How do you check if an arraylist is not empty?

579


Does substring start with 0?

557


What are accessor methods in java?

559


What is the difference between stringbuffer and stringbuilder class?

577


What is navigable map in java?

527


Add a value x to array from index l to r where 0 <= l <= r <= n-1

633


What are the differences between Java 1.0 and Java 2.0?

1681


If I only change the return type, does the method become overloaded?

541


How do you convert string to int in java?

565