update post how java code works