Auf Thema antworten

[code=Java]

public static void main(String[] args) {

        System.out.println(S.Papier + " --> " + S.Papier.ordinal());

        System.out.println(S.Schere + " --> " + S.Schere.ordinal());

        System.out.println(S.Stein + " --> " + S.Stein.ordinal());

    }


    enum S {

        Stein, Schere, Papier

    }

[/code]


abgesehen davon ... richtig coole Nerds spielen: rock paper scissors lizard spock !



Oben