Data Types
If Statements
For loops
Arrays
Books, books, and more books!
100

Describe int, string, and double variables in your own words.

Int is a whole number.

A string is a combination of words or letters surrounded by quotation marks.

A double variable is a decimal.

100

Is the third statement true or false?

int x = 15;

int y = 2;

(x * y) == 30;

it is True!

100

How many times will this code run?

for (int i = 0; i < 5; i++)

5 times

100

In your own words, describe an array.

Answers may vary.

100

What is Geronimo Stilton's sister's name?

Thea Stilton

200

Create an int variable called 'val' with correct syntax as well as a double variable named 'num'.

int val = 1;

double num = 2.5;

200

Is this True or False? Pay attention to every detail!

int x = 22;

int y = 30;

x - y == 8;

False!

x - y == -8;

200

How many times will this code run?

for (int i = 10;i > 4; i--)

6 Times

200

Declare an int, double, and String array.

int [] numbers = {0, 1, 2, 3};

double [] decimals = {2.5, 3.0, 4, 0.0}

String [] array = {“This”, “is”, “an”, “array”};

Values may vary.

200

Who is Trap Stilton?

Geronimo's Cousin

300

What is the variable 'a' equal to?

int x = 5;

double y = 4.3;

double a = x + y;

a = 9.3

300

Write an if statement that prints "Yes" if 15 multiplied by 2 is 30.

if (15 * 2 == 30) {

 System.out.println("Yes");

}

300

Write a for loop that loops 12 times.

for (int i = 0; i <= 12; i++)

for (int i = 0; i < 13; i++)

for (int i = 12; i >= 0; i--)

300

int [] numbers = {10, -5, 54, 7};

In this array, what value is at index 2?

The number 54.

300

Who is Harry Potter's best friend?

Ron Weasely

400

Create and declare a String variable that stores "Java is the best!".

String fav = "Java is the best!";

400

Is this true or false?

(2 * 3 == 6) && (4 / 1 == 2)

False!

4/1 is 4, not 2!

400

What will this code output?

for (int i = 0; i <= 4; i++) {

 System.out.println(i);

}

0

1

2

3

4

400

int [] numbers = {0, 1, 2, 3};

Access the 2nd value from this array.

numbers[1];

400

Who is the Diary of a Wimpy Kid about?

His name is Greg Heffley.

500

What does this code output?

String word = " awesome!";

int age = 16;

System.out.println("Ayush is " + age + " years old and is extremely" + word);

Ayush is 16 years old and is extremely awesome!

500

x = 3;

y = 6;

if (y/x == 2 || y - x == 3) {

 System.out.println("This is true!");

}


This is true!

500

What will this code output?

for(int i = 0; i < 5; i++) {

 if (i / 2 == 0) {

  System.out.println("I is even");

 }

}

I is even

I is even

I is even

500

Find the length of this array using the .length functon.

double [] decimals = {2.5, 3.0, 4, 0.0}

System.out.print(decimals.length;)

500

What shape is the scar on Harry Potter's forehead?

A lightning bolt.

M
e
n
u