beginner Java codes