Codes for java