There is no such thing as a "java algorithm". There are algorithms that can be implemented in
java, C, Perl, etc.
Bubble and quick sorts are very common, well documented ways of writing sorts. I'm sure if you searched, you could find algorithms in about 10 seconds.
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors