Hi,
kann mir bitte jemand sagen, was ich hier falsch mache oder vergessen habe?
Vorallem der Fehler bei ".readChar" in Zeile 18 beschäfigt mich und ich krieg ihn nicht behoben.
Fehlermeldung:
Danke
kann mir bitte jemand sagen, was ich hier falsch mache oder vergessen habe?
Vorallem der Fehler bei ".readChar" in Zeile 18 beschäfigt mich und ich krieg ihn nicht behoben.
Code:
class Aufgabe3
{
public static void statusOut(String directions) {
System.out.println("You are at position " + currentLocation);
System.out.print("Choose your direction " + directions + ": ");
}
static int currentLocation = 5;
public static void main(String[] args)
{
char choice ;
do {
if (currentLocation == 5) {
choice = Aufgabe3.readChar();
if (choice == 'f') {
System.out.println("You died.");
choice = 'q';
}
}
else if (currentLocation == 15) {
//...
}
//...
} while ( (choice != 'q') && (!youDied) );
}
}
Fehlermeldung:
Danke