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
When should you use arraylist and when should you use linkedlist?
How do you use compareto in java?
What is the impact of declaring a method as final?
What are the differences between forwarding () method and sendredirect() methods?
Explain about OOPS concepts and fundamentals.
What is the functionality of the stub?
What is a class object?
What is garbage collection? What is the process that is responsible for doing that in java?
Which collection does not allow duplicates in java?
What is a method in java?
Explain about main thread in java?
For ease of programming you can consider the maze as a 2D array with colors represented by below integer and characters (in capital letters). • B - Black • W -White • G- Green • R- Red R B W B W W W W W W B W B B W W W W W W W B W B W W W B W W W W B B W W W B W W W B W W B B B B W B W B W W B W W W B W W W B B B W W B W W W B W W B W B W W W B W B W W W W B B W W W W B W W W W W G Shortest Route Problem: • Solution that finds the shortest Route between Red and Green White will have 1 Weight. Red and Green carry no weights. Shortest path is the path with less weight when you add up the weights in the path.
Why are parameters used in functions?
Can a class have multiple constructors?
Is nullpointerexception checked or unchecked?