There are many sorting algorithms. According to what you posted, it looks like you are trying to implement the
quicksort algorithm. In my opinion the simplest sorting algorithm to understand is the
bubble sort. In any case and contrary to what you claim, I did find Web pages that explain how to implement quicksort in java. Here is a page explaining
quicksort in java. Simply google for
quicksort java. And here is a page explaining
bubble sort. Again simply google for
java bubble sort. By the way, in case you are unaware, class
java.util.Arrays has several, static
sort() methods.