Is java supports multiple inheritance? explain?
Answers were Sorted based on User's Feedback
Answer / kash
Two types of inheritance in Java:
Class inheritance : A sub class can have only one base class ( Single inheritance). Although the sub class can itself be a base class to another sub class ( Multi level inheritance).
Interface inheritance: interface allows multiple classes to implement abstract methods defined on it ( so supports multiple inheritance)
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / praveenkumar
yes java supports multiple inheritance but not directly.
By implementing single inheritance we can acheive multiple
inheritance.See for example
class A{
some method();
}
class B extends A
{
}
class C extends B
{
}
like tht we can acheive multiple inheritance.
| Is This Answer Correct ? | 3 Yes | 18 No |
What is java and their uses?
what is mean by thread lock?
Can we override constructor?
How can a gui component handle its own events in java programming?
If circular link of two objects, then will it be garbage collected ?
What does n mean?
What is increment in java?
What are the two ways you can synchronize a block of code?
Explain the difference between the public, private, final, protected, and default modifiers?
What is number data type in java?
How many statements can be created with one connection in jdbc?
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.