Tagged: 자료구조

[자료구조] JAVA로 ArrayList 구현해보기

public class mainClass { public static void main(String[] args){ ArrayList arrayList = new ArrayList(); arrayList.add(“10”); arrayList.add(“20”); arrayList.add(“30”); System.out.println(arrayList.getSize()); System.out.println(arrayList.toString()); //arrayList.indexOf(2); arrayList.addIndex(1, “15”); System.out.println(arrayList.toString()); arrayList.remove(2); System.out.println(arrayList.toString()); } }   public class...