java practice.  UCSC CS homework