added new JAVA code in equations