explain the concept of inheritance with an example?

Answer Posted / shekar

Inheritence is the process by which one object acquires the
properties of another object. by using the extends keyword.

Adv:

It is easier to reuse code

Is This Answer Correct ?    40 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to perform linear search in java?

758


how to create multithreaded program? Explain different ways of using thread? When a thread is created and started, what is its initial state? : Java thread

763


what are three ways in which a thread can enter the waiting state? : Java thread

791


Can Exception handling we can handle multiple catch blocks?

842


How to do encapsulation in java?

829


How static variable work in java?

828


How many digits can a float hold?

766


When is an object subject to garbage collection?

791


Is ++ operator thread-safe in java?

896


What is difference between final and immutable?

792


What is field name?

782


What is multi level inheritance in java?

774


What is primitive data type in java?

743


What is difference between hashset and hashmap in java?

706


Can list be null in java?

777