Methoden in Methoden [duplizieren]

Diese Frage hat hier bereits eine Antwort:

Geschachtelte Funktionen in Java 6 answers

Ist es syntaktisch korrekt, eine Methode innerhalb der Hauptmethode in Java zu haben? Beispielsweis

class Blastoff {

    public static void main(String[] args) {

        //countdown method inside main
        public static void countdown(int n) {

            if (n == 0) {
                System.out.println("Blastoff!");
            } else {
                System.out.println(n);
                countdown(n - 1);
            }
        }
    }
}

Antworten auf die Frage(1)

Ihre Antwort auf die Frage