how to create dynamic string array in java

Solutions on MaxInterview for how to create dynamic string array in java by the best coders in the world

showing results for - "how to create dynamic string array in java"
Brooke
29 Mar 2017
1ArrayList<String> mylist = new ArrayList<String>();
2mylist.add(mystring); //this adds an element to the list.
Alix
02 Sep 2020
1List<String> zoom = new ArrayList<>();
2zoom.add("String 1");
3zoom.add("String 2");
4
5for (String z : zoom) {
6    System.err.println(z);
7}