Work done in java