Please enable JavaScript to use CodeHS

Latte Glossary

Flashcards

Course:

Module:

Lesson:

Search:

Loop General

A loop is a way to repeat code in your program.

Loop

While Loop General

Lets us repeat code as long as something is true.

While Loop

Condition General

A condition is code that you put inside an if statement or while-loop.

Condition

If Statement General

An if statement lets you ask a question to the program and only run code if the answer is true.

If Statement

If Else Statement General

Control structure that lets us run either one section of code or another depending on a test.

If Else Statement

Comparison operator General

Used to make comparisons between values.

comparison operator

For Loop Java

A for loop lets us repeat code a **fixed number of times**.

System.out.println Java

Java method that lets us print out a line of output to the user

System.out.print Java

Java method that lets us print output to the user, without ending the line printed.

Variable Java

A symbol or container that holds a value.

int Java

`int` is a Java type that represents an integer (a whole number)

String Java

String is a Java type that represents a string of characters (text)

char Java

`char` is a Java type that represents a single character (a single letter)

boolean Java

`boolean` is a Java type that can either be true or false

double Java

`double` is a Java type that represents a real number with decimal values

Declare a variable Java

Declaring a variable is defining it for the first time.

Initialize a variable Java

Initializing a variable is giving it an initial value, or a starting value.

Assigning to a variable Java

Assigning to a variable is updating the variable's value

readLine Java

Java method that lets us read in a line of input from the user as a String

readInt Java

Java method that lets us read in an integer input from the user

readDouble Java

Java method that lets us read in a decimal value input from the user

readBoolean Java

Java method that lets us read in a true or false value input from the user

Casting Java

Casting is turning something of one type into another type

And operator Java

Logical operator that ANDs two boolean values. Written as `&&`. `a && b` will be true if both `a` and `b` are true.

Or operator Java

Logical operator that ORs two boolean values. Written as `||`. `a || b` will be true if `a` or `b` is true.

Not operator Java

Logical operator that negates a single boolean value. Written as `!`. `!a` will be true if `a` is false, and false if `a` is true.

Logical Operator Java

Used to make logical associations between boolean values.

Loop-and-a-half Java

A loop, most often set with `while(true)`, that has a `break` statement in the loop body.