hallo everyone,
i am learning java, i am trying to learn now the Generics. i have written this program and i dont know why i keep getting error "Command execution failed.".
public class Mavenproject2 {
public static void Main(String[] args){
underclass <Double> taha = new underclass <>(4.0, 5.0);
taha.display();
}
}
public class underclass <T> extends Superclass{
T breite;
T hoehe;
public underclass(T breite, T hoehe){
super(4);
this.breite=breite;
this.hoehe=hoehe;
}
public void display(){
System.out.println("breite = " + this.breite + "hoehe" + this.hoehe + "ecken" + super.getEcken());
}
}
public abstract class Superclass {
Integer Ecken;
public Superclass(Integer Ecken){
this.Ecken=Ecken;
}
public Integer getEcken(){
return Ecken;
}