Some JAVA Examples of Basic Algorithms