Assorted Java homework