Converted BubbleSort.cpp to BubbleSort.java