for JAVA code