JAVA example program