Java examples from introduction to java programming