My Java codes.