Updating java examples