Updated some Java codes.