Skip to content

Instantly share code, notes, and snippets.

@BMU-Verlag
Created July 7, 2020 08:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BMU-Verlag/231ad594b02ceadd92a53e364358cd9e to your computer and use it in GitHub Desktop.
Save BMU-Verlag/231ad594b02ceadd92a53e364358cd9e to your computer and use it in GitHub Desktop.
import java.util.ArrayList;
public class Liste {
public static void main(String[] args) {
ArrayList<String> Staedte = new ArrayList<>();
Staedte.add("Berlin");
Staedte.add("Hamburg");
Staedte.add("Stuttgart");
Staedte.add("Köln");
System.out.println(Staedte);
Staedte.add(3, "Frankfurt");
System.out.println(Staedte);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment