added java 1 code.