Java Sort Array Without Using Functional Words