Professional Documents
Culture Documents
CC112 Reviewer
CC112 Reviewer
CC112 Reviewer
Variable Lifetime
END
• Lifetime – duration for which a variable exists in memory.
• Local Variables – created when the method is called and
destroyed when the method exits.
• Global Variables – exist throughout the program’s execution.