Why is inheritance used in java?



Why is inheritance used in java?..

Answer / Sandhya Singh

Inheritance is used in Java to achieve code reusability, create hierarchical classifications, and establish a 'is-a' relationship between classes. It allows a new class to acquire properties (methods and fields) from an existing class.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

Is Java a dying language?

1 Answers  


Can we inherit a class with private constructor?

1 Answers  


What do you mean by ternary operator in java?

1 Answers  


What is default exception handling in java?

1 Answers  


How many types of methods are there?

1 Answers  


whats is inheritance?

15 Answers   CTS, HCL,


How will you invoke any external process in java?

1 Answers  


what r advatages of websphere? & how to deploy?

1 Answers   Saksoft,


What are memory tables?

1 Answers   Aspiring Minds,


What is the immediate parent class of the Applet class?

1 Answers  


Difference between JVM and JRE?

3 Answers   Amdocs,


What is map and hashmap? also tell the difference.

1 Answers  


Categories