Variable Types
More on Variables
Math in Java
More Math in Java
Miscellaneous
100

Java type that represents a whole number.

int

100

Java type that is a true or false value.

Boolean

100

Allows users to input whole number values.

variable.nextInt()

100

Increase the value of a variable by one.

Increment (variable++;)

100

Displays output on the computer monitor and moves the cursor to the next line.

System.out.println

200

Java type that represents a real number with decimal values.

double

200

A Java type that represents multiple characters (text).

String

200

Allows users to input numeric values with decimals.

variable.nextDouble()

200

Decrease the value of a variable by one.

Decrement (variable--;)

200

Allows users to input String values.

variable.nextLine()

300

Java type that represents a single letter.

char

300

Defining a variable for the first time.

Declare a variable

300

Operator that divides two numbers and returns the remainder.

Modulus operator (%)

300

The order in which mathematical expressions should be evaluated.

Order of Operations

300

A class within java.util. It contains code specifically designed to help with user input.

Scanner class

400

The basic, simple data types that are inherent to Java (such as int, double, char, and boolean).

Primitive Type

400

Giving a variable an initial value, or a starting value.

Initialize a variable

400

The fixed value being assigned to a variable. Often primitive data types.

Literal

400

Type of division in which the decimal values are truncated, or chopped off.

Integer Division

400

Class header. The name of MyProgram must match the name of the file.

public class MyProgram

500

Data type that stores the address of a value (such as String).

Reference Type

500

Keyword that prevents variables from changing value.

final

500

Thrown to warn programmers about mathematical errors in their code.

ArithmeticException

500

Allow programmers to shortcut variable assignments that include the variable being assigned a new value. (example: x = x + y; shortcut: x += y;

Compound Assignment Operators

500

Main method header. Code to be run must be placed within the main method.

public static void main(String args[])

M
e
n
u