first homework in Java