Java and some Algorithms described by Java ~