(List<String> a)
| 46 | a.clear(); // Remove all elements |
| 47 | } |
| 48 | public static void iterMotion(List<String> a) { |
| 49 | ListIterator<String> it = a.listIterator(); |
| 50 | b = it.hasNext(); |
| 51 | b = it.hasPrevious(); |
| 52 | s = it.next(); |
| 53 | i = it.nextIndex(); |
| 54 | s = it.previous(); |
| 55 | i = it.previousIndex(); |
| 56 | } |
| 57 | public static void iterManipulation(List<String> a) { |
| 58 | ListIterator<String> it = a.listIterator(); |
| 59 | it.add("47"); |