Please enable JavaScript to use CodeHS

AP Computer Science A (Mocha)

Lesson 2.2 Variables and Types

Description

Variables allow us to store information such as numbers, words, or true/false expressions. A variable can be thought of as a box that stores information inside. In Java, variables are composed of three things: a name, type, and value.


Objective

Students will able to write programs using variables by declaring, initializing and assigning a value to their variable.