Java programming test from Dec 2010