To sort an array, look into the Comparator interface.Second question, put a label on the for loop that youwant to continue and name the label in your continue.Example :outer :for{for{if{for{if ( true )continue outer;...