Commit 9052b4a5 authored by daidekun's avatar daidekun

fix

parent f0947575
......@@ -18,12 +18,12 @@ def partition(array, size) {
}
def partList(al, fromIndex) {
System.out.println("Original ArrayList Content: "+al);
def partList(al, fromIndex, size) {
print "Original ArrayList Content: "+al
ArrayList<String> al2 = new ArrayList<String>(al.subList(0, fromIndex));
System.out.println("SubList stored in ArrayList: "+al2);
partOne = al.subList(0, fromIndex)
print "SubList stored in partOne: "+partOne
List<String> list = al.subList(fromIndex + 1, al.size());
System.out.println("SubList stored in List: "+list);
partTwo = al.subList(fromIndex + 1, size)
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