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
What is a boolean in java?
What are "class access modifiers" in Java?
Mention some interfaces implemented by linked list in java.
Why pointers are not used in java?
How java uses the string and stringbuffer classes?
If two threads have same priority which thread will be executed first ?
Explain the difference between a Thread and a Process.
Can I uninstall java?
Can interface be private in java?
What is the Difference between Final Class && Abstract Class?
String and stringbuffer both represent string objects. Can we compare string and stringbuffer in java?
What is indexof in java?
What does += mean coding?
What invokes a thread's run() method in java programming?
What is string in java?