Beginner Java experiment to learn the language