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 |
Is Java a dying language?
Can we inherit a class with private constructor?
What do you mean by ternary operator in java?
What is default exception handling in java?
How many types of methods are there?
whats is inheritance?
15 Answers CTS, HCL,
How will you invoke any external process in java?
what r advatages of websphere? & how to deploy?
What are memory tables?
What is the immediate parent class of the Applet class?
Difference between JVM and JRE?
What is map and hashmap? also tell the difference.