Bubble sort in java without using function