AP Computer Science A

study guides for every class

that actually explain what's on your next test

Global variables

from class:

AP Computer Science A

Definition

Global variables are variables that are declared outside of any function and can be accessed from anywhere within the program. They have a global scope, meaning they can be used by any part of the code.

© 2024 Fiveable Inc. All rights reserved.
AP® and SAT® are trademarks registered by the College Board, which is not affiliated with, and does not endorse this website.