Wann verwendet man array attribute in java?

1 Antwort

Wenn man eine Liste von Dingen speichern will:

String[] arr = new String[] { "Max", "Peter", "Paul" };

System.out.println(arr[0]); // Max
System.out.println(arr[1]); // Peter
System.out.println(arr[2]); // Paul
Woher ich das weiß:Berufserfahrung – Informatiker Applikationsentwicklung