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 the purpose of checked and unchecked exceptions in JAVA?

775


What is the purpose of the System class?

771


What are the benefits of operations in java?

680


Why java is not 100% object-oriented?

1176


Explain a situation where finally block will not be executed?

761


How do you reverse a list?

759


Addition to previous section relative word 5th one was Putrid ans: rotten, also there was prob. in 1st section on bucket weight ans:10kg, also there was a prob. on train speed to find bridge length ans:800 mtrs.

1815


How do you declare an array that will hold more than 64KB of data?

913


What is the base class in java from which all classes are derived?

727


What are the types of strings?

773


If we don’t want some of the fields not to serialize how to do that?

776


what is synchronization? : Java thread

776


What is the difference between a synchronized method and a synchronized block?

843


What is a parameter used for?

717


Give the difference between the println method and sqrt method?

836