sir i have little bit confusion about multilevel&multiple inheritance
and why doesn't support multiple inheritance
Java doesn't support multiple inheritance because there are logical problems associated with multiple inheritance.
Attributes: name, age....(ect.)
Methods: toString(), ... (ect.)
Attributes: name, number,...(ect.)
Methods: toString(), ....(ect.)
If MyNewClass where to inherit from both Class1 and Class2, there would be a problem. Does MyNewClass inherit its name from Class1 or Class2, does MyNewClass inherit the toString() method from Class1 or Class2.
Multiple inheritance has the potential to create ambiguity. The compiler can't handle that kind of ambiguity, so the people who made Java didn't allow the option of multiple inheritance.
There might be other reasons Java developers didn't allow for multiple inheritance, but I know that aforementioned issue is definitely one of the reasons.