Is it a problem that the sort method also prints out the array? Because I can't find any other way if the method is void.