section 1.1 of Intro to Programming in Java book