We know that abstract class contains both abstract and non - abstract methods , so what if we have only abstract methods so that we can achieve multiple inheritance like interfaces.
Here is the example:
public abstract class superclass1 {
public abstract void func ( );
}
public abstract class superclass2 {
public abstract void func ( );
}
public class test extends superclass1 , superclass2 {
/* Code goes here */
}
I know above code is not possible but why Java is not allowing it , because we define class body only after extending it just like interfaces and work correctly such that , so there will be no ambiguity and no problem.