My code from introduction to java