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
What is exception propagation?
Can you override private or static method in java?
What is passed by reference and pass by value ?
Does java have extension methods?
What is static import?
What is the use of http-tunneling in rmi?
Can we write multiple catch blocks under single try block?
Is break statement can be used as labels in java?
What are recursive functions?
What is member in java?
Do we need to manually write Copy Constructor?
How the metacharacters are different from the ordinary characters?
What is connection class in java?
What is method overloading in JAVA? Why is it not present in C ?
How does split work in java?