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 difference between exception and error in java?
What are Normalization Rules? Define Normalization?
What is a local, member and a class variable?
What is immutable in java?
Can the garbage collection be forced by any means?
What are sets in java?
Can a constructor call the constructor of parent class?
What the difference is between execute, execute Query, execute Update?
Why are global variables used?
Where local and global variables are stored?
Can an object subclass another object?
Are arrays immutable in java?
When is the finally clause of a try-catch-finally statement executed?
How do you end a program?
what is the difference between future and callable interface in java?