Assorted Java code from an introductory Java course