ArrayList al = new ArrayList(); al.add(3); al.add(2); al.add(1); al.add(4); al.add(5); al.add(6); al.add(6); Iterator iter1 = al.iterator(); while(iter1.hasNext()){ System.out.println(iter1.next()); }
Integer a[] = {1,2,3,4,5,6,7,8,9,10}; ArrayListX = new ArrayList (Arrays.asList(a)); ArrayList A = new ArrayList (Arrays.asList(1,2,3,4,5,6,7,8,9,10)); Vector B= new Vector (Arrays.asList(1,2,3,4,5,7,8,9,10));
https://dzone.com/articles/arraylist-vs-linkedlist-vs
No comments:
Post a Comment