Work done in Java