Worked on Java exercises