update java code