public Tipo getTipo() {
return this.Importo < 0.0 ? Tipo.USCITA : Tipo.ENTRATA;
}
public int compareTo(Movimento m) {
if (this.idConto != this.idConto) {
return this.idConto - this.idConto;
}
return this.DataMov.compareTo(this.DataMov);
}
public static enum Tipo {
ENTRATA,// here i have this error : The constructor Movimento.Tipo() is undefined
USCITA;// here is the same : The constructor Movimento.Tipo() is undefined
private Tipo(String string2, int n2) {
}
}
Ich habe bereits Konstruktor, den ich brauche, was muss ich noch schreiben?Der Konstruktor ist nicht definiert? Enum Fehler
Sie schrieb einen Konstruktor, der zwei Argumente übernimmt, aber kein Standardkonstruktor. Das bedeutet, dass der Compiler keinen arg-Konstruktor zur Verfügung stellt. Sie sollten einen zur Verfügung stellen. – duffymo