r/programmingbydoing • • Jun 19 '14

#160: Exchange Sort

I keep getting an ArrayIndexOutOfBoundsException when I try to pass the array and the array numbers to the swap method (I think). It does work when I don't use the swap method (using the commented out part instead) which leads me to believe that. Am I passing to swap incorrectly?

http://pastebin.com/D6xbKF4r

Thanks

2 Upvotes

2 comments sorted by

View all comments

Show parent comment

1

u/[deleted] Jun 19 '14

Ah, that makes sense. Thank you!