Casting
Compound Operators
Data Types
PEMDAS
Input
Module
Variables
100

What is it called when you change one data type into another between int and double?

Casting

100

What does ++ do the value of a variable?

Adds +1

100

What is the data type of 0?

int

100

In Java, this operation happens first in the order of operations.

Parentheses

100

What does the Scanner class let you do?

Allows user input

100

What does module refer to?

The remainder of two numbers after division

100

What is wrong with the variable name 3score?

Variables cannot begin with a number.

200

What is the value of (int)5.9?

5

200

What is the result if int x = 5; x += 3;

8

200

What data type would best store a person’s GPA?

double

200

What is the value of 2 + 3 * 4?

14

200

Write the code to create a new Scanner named scan.

Scanner scan = new Scanner(System.in);

200

What is the value of 10 % 4?

2

200

What does it mean to initialize a variable?

You assign it a value

300

If int x = 3; double y = 2.0; what is the result of x / y?

1.5

300

Rewrite count = count - 1; using a compound operator.

count -=1

300

This data type is used to store true or false values.

boolean

300

What is the value of 2 + 12 / 3 * 2?

10

300

What method of Scanner reads an integer value?

scan.nextInt();

300

What is the value of 3 % 9?

3

300

Declare a variable called age and initialize it to 17.5 in one line.

double age = 17.5;

400

What is the result of (double)(7/2)?

3.0

400

What is the final value of z given the following code?
int z = 6;
z += 4;
z *= 2;
z -= 5;

15

400

What data type is the output of:
System.out.println(3 + 4.0);?

double

400

What is the value of 7 / 2 * 2?

6

400

Write the code to read a user’s name as a String. Include the print statement.

System.out.println("What is your name? ");
String name = scan.nextLine();

400

What is the value of 4 % 5 % 0?

run time error

400

What is the default value of a double variable?

0.0

500

What is the output of the following code?
int a = 5;
int b = 2;
double c = (double) a / b;
System.out.println(c);

2.5

500

What is the final value of x if
int x = 10;
x *= 2;
x /= 5;
x--;

3

500

What is the data type of the output of the following code:
String s1 = "AP";
String s2 = "CSA";
String s3 = s1 + 1 + 2 + s2;
System.out.println(s3);

String

500

What is the output of the following code?
double result = 10 - 3 * 2 + 8 / 4.0;
System.out.println(result);

6.0

500

What do you need to include after using a scanner to input int or double?

scan.nextLine();

500

What is the value of 15.0 % 3.0?

0.0

500

What do you include when declaring a variable?

data type & name

M
e
n
u