Advantages of Inheritance in java.

Answer Posted / sitaram

Inheritance: The base class properties into subclass class
is called inheritance.
Inheritance example:Father and child relation. Father
having 10 lakhs property. That property is always avilable
to child. Father is a parent class. child is a subclass.
Advantage: 1.subclasss take the all properties from parent
class.
2.suppose you can add any property in parent class. That
will be effected to subclasses also.

Is This Answer Correct ?    22 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is abstract class constructor called?

563


What are the 7 types of characters?

562


What’s the difference between the methods sleep() and wait()?

538


What about static nested classes in java?

586


who can i handle multiple client in RMI

1438






Is java 9 released?

519


Can inner class extend any class?

594


Why string is immutable with example?

526


Why we do exception handling in java and how many types of exceptions are there?

543


extending thread class or implementing runnable interface. Which is better? : Java thread

561


What do you understand by classes in java?

551


How do you use substring in java?

542


What is a char in java?

530


What is singleton class in java and how can we make a class singleton?

566


Implement a stack with push (), pop() and min() in O(1) time.

624