Java exercises.