Added JAVA Code