Hi all,
I need a method which checks to see if an ArrayList is sorted in a ascending order. I keep getting an IndexOutofBound error. Wonder if you can help me to work around this.
Code:public static boolean isSorted(ArrayList<Double> array) {
boolean result = true;
for(int i = 0; i <array.size(); i++) {
if(array.get(i) >= array.get(i+1)) {
result = false;
break;
}
}
return result;
}

