exercise for java