JAVA bubble sort and selection sort