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 difference between static and final?
What is the difference between preemptive scheduling and time slicing in java programming?
Does string is thread-safe in java?
What is the r character?
Which collection is sorted in java?
there are N number of matchboxes numbered 1...N.each matchbox contain various number of stick.Two player can alternatevely pick some amount of stick from the higest stick containing box . The player is condidered win if there is no stick after his move.Find the final move so that the move player win. Note:In case the number of stick is equal ,pick the stick from the higest numbered box.
What is a numeric format?
What does java stand for?
Is it possible to use Semaphore/ Mutex in an Interrupt Handler?
What are the 4 types of research methods?
What is the difference between Java Program Constructor and Java Program Method, What is the purpose of Java Program constructor Please Explain it Breafily?
What is a local, member and a class variable?
Explain wait() method of object class ?
Explain the importance of finally over return statement?
Can I import same package/class twice?