Auf Thema antworten

Meine option:

[CODE lang="java" title="test"]package test;


Auto[] automobile;


public class test{

    public static main(String[] args) {

        automobile = Auto[100];

        //Autos hinzufügen

        for(Auto auto:automobile) {

            System.out.println(auto.type); // Oder andere Methode. Ersetze dann "auto.type" zu "auto.METHODE" die den Autotyp ausgibt(oder was du ausgeben möchtest)

        }

    }

}[/CODE]



Oben