explain the concept of inheritance with an example?

Answer Posted / kush singh

Inheritance is a process of inheriting members and member functions of a particular class. This means one class can use the data members and functions of another similar class. This reduces efforts as similar data members or functions do not need to be declared again and again.

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does null mean in java?

624


What is array initialization in java?

486


Explain differences between checked and unchecked exceptions in java?

631


What does string [] args mean?

536


How to compare strings in java?

497






What is immutable state?

502


Can we write any code after throw statement?

600


Why lambda expression is used in java?

566


What is the history of java?

541


What are passing parameters?

584


Is boolean a wrapper class in java?

597


How we create object in copy constructor?

637


What is hashmap and map?

549


Why is java so important?

643


Can classes declared using the abstract keyword cab be instantiated?

555