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 the use of java?
What is sizeof () operator?
Is math an abstract class in java?
Explain java heap space and garbage collection?
What is the difference between array and array list in java?
What is use of map in java?
What is jagged array in java?
Give the hierarchy of inputstream and outputstream classes.
What is parsing in grammar?
What is numel matlab?
What are inbuilt functions in java?
What is static block?
How we can generate random numbers in java?
What does i ++ mean in Java?
How many bits is a double?