Fix variable name in java examples