Compiler Error J0123

Multiple inheritance of classes is not supported

The compiler detected a class attempting to apply the keyword extends to more than one base class. This is defined as multiple inheritance in other languages and is not supported in Java.

The following example illustrates this error:

public class Simple extends BaseClass1, BaseClass2 {
   // error: multiple inheritance not supported in Java
}

class BaseClass1 {
   
   // do something meaningful
}

class BaseClass2 {
   
   // do something meaningful
}