I started on implementing what is a very trivial sorting algorithm. It's supposed to take numbers, and it's supposed to sort those digits from smallest to greatest.
Unfortunately, I've run into an error which I can't seem to decipher. As you can see in my code below, my algorithm takes a String: "654321."
I turn this String to a Char Array.... In my for loop, I compare the  index of against the next one. This is where the error occurs!
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 6
Also, out of curiosity... what type of algorithm have I tried to implement? Is this a "selection sort?" I haven't studied bubble, bucket, insertion, heap, etc. formally... but I imagine this falls under one of these categories?
My Main/Launcher Class:
My class containing the method to my "algorithm":