hallo zusammen , ich bin anfänger was java angeht. ich versuche ein datei tu lesen.
mein problem ist:
ich habe ein class mit Kontruktor heisst ERgebnis(int index)
The constructor for an ERgebnis instance. A positive index should be provided; otherwise, though theERgebnis instance will be created, the repository will not treat it as a valid instance.
The instance will be initialized.
Parameters:
Index - the index. Should not be 0 or negative.
wie kann ich das als code
mein code ist so :
private int index;
public ERgebnis(int index){
this.index= index;
}
public ERgebnis(){ //initialisierung
this(1);
}
ist das richtig oder fehlt was?
mein problem ist:
ich habe ein class mit Kontruktor heisst ERgebnis(int index)
The constructor for an ERgebnis instance. A positive index should be provided; otherwise, though theERgebnis instance will be created, the repository will not treat it as a valid instance.
The instance will be initialized.
Parameters:
Index - the index. Should not be 0 or negative.
wie kann ich das als code
mein code ist so :
private int index;
public ERgebnis(int index){
this.index= index;
}
public ERgebnis(){ //initialisierung
this(1);
}
ist das richtig oder fehlt was?
Zuletzt bearbeitet: