java exercise demo