Commit 9052b4a5 authored by daidekun's avatar daidekun

fix

parent f0947575
...@@ -18,12 +18,12 @@ def partition(array, size) { ...@@ -18,12 +18,12 @@ def partition(array, size) {
} }
def partList(al, fromIndex) { def partList(al, fromIndex, size) {
System.out.println("Original ArrayList Content: "+al); print "Original ArrayList Content: "+al
ArrayList<String> al2 = new ArrayList<String>(al.subList(0, fromIndex)); partOne = al.subList(0, fromIndex)
System.out.println("SubList stored in ArrayList: "+al2); print "SubList stored in partOne: "+partOne
List<String> list = al.subList(fromIndex + 1, al.size()); partTwo = al.subList(fromIndex + 1, size)
System.out.println("SubList stored in List: "+list); print "SubList stored in partTwo: "+partTwo
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment