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 Java Package and which package is imported by default?
Explain the Propertie sof class?
What is the use of bufferedreader?
Is there is any difference between a scrollbar and a scrollpane?
What is hasnext in java?
What is the purpose of abstract class?
Explain serialization and deserialization in java?
What is a double?
What are the application of stack?
How java uses the string and stringbuffer classes?
What is assembly condition codes?
What is a 16 bit word?
Is it possible to override private or static method in java?
What environment variables are required to be set on a machine in order to run Java programs?
What is substring in java?