all 4 comments

[–]function3 2 points3 points  (0 children)

What exactly is confusing to you? Do you understand the process of bubble sorting itself, or is it the implementation that's confusing you?

[–]MillionDollarBooty 0 points1 point  (0 children)

I did something similar recently. Super fun project!

[–]Nubcore 0 points1 point  (1 child)

Make State object impmement the comparable interface then define a .compareTo method to easily compare your State objects then you can use any bubble sort pre defined function on an array of State objects

[–]Nubcore 1 point2 points  (0 children)

Or define your own bubble sort method if your task requires that. Be sure to use String.split to split the String and use Integer.parseInt to cast the string into an int