import java.util.ArrayList; public class Test { public static void main(String[] args) { ArrayList list = new ArrayList<>(); list.add("Beijing"); list.add("New York"); System.out.println(list); } }