Follow along with the video below to see how to install our site as a web app on your home screen.
Anmerkung: This feature may not be available in some browsers.
public void act5(int strecke)
{
int anzahl = 0;
for(int i = 0; i < strecke; i++)
{
schritt();
if(hindernisRechts())
{
anzahl++;
}
}
System.out.println(anzahl);
}
Zusäzlich befindet sich die Ausgabe auch nicht merh in der act5 Methode, so dass ich mich überhaupt wundere, dass der Code läuft und keinen Fehler beim kompilieren liefert.