basic Java codes