Open Side Menu Go to the Top
Register
Cannot understand why I am getting this error [Java] Cannot understand why I am getting this error [Java]

09-30-2019 , 10:35 PM
This is not homework.

I cannot understand why I am getting an IndexOutOfBounds error. Can someone please help? It's driving me crazy.

https://pastebin.com/cspZuHHD
Cannot understand why I am getting this error [Java] Quote
09-30-2019 , 11:33 PM
I've not gone deep into the code but it's because this
Arrays.asList(notAbundantSummable).indexOf(sum)
returns -1, which it does because the value of sum is not in your array
Cannot understand why I am getting this error [Java] Quote
10-08-2019 , 04:40 PM
looks like you're running into an issue because your arrays starting indexing the first element at 0 (so the last element in an array of length n is the item[n-1] ) while in a List object the index starts at 1 for the first object (the last object of a List of length n is at element n)
Cannot understand why I am getting this error [Java] Quote

      
m