Java hw #3