Some sample JAVA codes