Answer Posted / kureshi salman
Inheritance means deriving a child class from a parent class
(i.e.existing class).
Use of inheritance iin java is we can reuse of a code.
For Ex.
class a
{
//variables.....
//methods.......
}
class b extends a
{
//variable of class a....
//methods of class a.....
//also
//variables and methods of class b
}
it means that we can inherit the class and features of
existing class in a new class.
Is This Answer Correct ? | 29 Yes | 3 No |
Post New Answer View All Answers
How many types of constructors are used in java?
How do you classify Dialog Box?
what is the constructor and how many types of constructors are used in java?
Is Constructor possible in abstract class in java ?
How you can force the garbage collection?
Difference between throw and throws?
How do you use spaces in java?
What is the syntax and characteristics of a lambda expression? Explain
What is the difference between menuitem and checkboxmenu item?
Difference between object instantiation and construction ?
What is the difference between abstract classes and interfaces?
What is meant by inheritance and what are its advantages?
What do you mean by light weight and heavy weight components?
What is method with example?
What is data type in java?