Java Code Derived From Javascript Logic Is Not Working

Java Code Derived From Javascript Logic Is Not Working