Assorted java homework