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 do you add an element to a set in java?
does java support pointers?
What is data member in java?
What is the role of garbage collector in java?
Is boolean a data type in java?
Can we use catch statement for checked exceptions?
How many static init can you have?
how many types of Inheritance?
What is the inheritance?
Can we call virtual funciton in a constructor ?
Difference between overriding and overloading in java?
What do you mean by a JVM?
How does multithreading take place on a computer with a single cpu in java programming?
When throws keyword is used?
What are the important methods of java exception class?