I\'m attempting to create a method that checks an array for increasing elements. True should be returned if all the elements are in increasing order. I get an out-of-bounds
Because in a list with n items there are only n-1 gaps between them.
n
n-1
Change to
for (int i=0; i
(Also you might want to check whether starting with false and setting to true is the right way around).
false
true