AP CSA Unit 1: Lesson 2 - User Input and Variables

0.0(0)
Studied by 4 people
0%Exam Mastery
Build your Mastery score
multiple choiceAP Practice
Supplemental Materials
call kaiCall Kai
Locked
Card Sorting

1/7

flashcard set

Earn XP

Last updated 4:38 AM on 9/14/22
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

8 Terms

1
New cards
Scanner
allows us to take user input and incorporate it into our programs
2
New cards
variables
containers in memory
3
New cards
declare
when we declare a variable, we tell the computer to allocate some space in memory for something
4
New cards
initialize
when we first put a value in the container we initialize the variable
5
New cards
assignment operator
equals sign (=)
6
New cards
naming variable rules
We can only use letter/number characters and the special characters _ and $. No spaces or other characters are allowed.
Your variable can't start with a number (so num1 is ok as a variable name but 1num is not).
You can't use names which already have a meaning in Java (e.g. we can't name our variable String or System).
7
New cards
concatenation
when we glue strings together using a plus sign
8
New cards
comments
useful for writing a reminder of what code does, leaving ourselves a to-do list, or for isolating a problem while debugging