Answer the question
In order to leave comments, you need to log in
Multiple inheritance java, what am I doing wrong?
First of all, I create a "top class".
public class TOP {
public TOP() {
System.out.println ("TOP");
}
}
public class LEFT {
public LEFT (){
super ();
System.out.println("LEFT");
}
}
public class RIGHT {
public RIGHT (){
super ();
System.out.println("RIGHT");
}
}
public class CommonClass extends RIGHT, LEFT {
public static void main (String [] ags){
new RIGHT ();
new LEFT ();
}
}
Exception in thread "main" java.lang.Error: Unresolved compilation problems:
Syntax error on token "]", :: expected after this token
Syntax error, insert "SimpleName" to complete Type
at CommonClass.main(CommonClass.java:4 )
Answer the question
In order to leave comments, you need to log in
Multiple inheritance java, what am I doing wrong?
//A-Z - интерфейсы
public class CommonClass extends Direction implements A, B, C, D, Z
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question