Java Foundations
Printing & Syntax
Methods & Classes
Array Academy
Java Toolkit
100

The main programming language that we will be using in Term 2.

What is Java?

100

This Java statement prints Hello, World! and then moves to a new line.

What is System.out.println("Hello, World!");?

100

This keyword is used to declare a method that does not return a value.

What is void?

100

The index of the first element in a Java array?

What is 0?

100

This Java keyword allows you to use a class from another package by its simple name.

What is import? 

200

Unlike C++, Java source code is typically organized around this programming structure.

What are classes?

200

If System.out.println(); moves to a new line, then System.out.print();...

What is prints without moving to a new line?

200

In the declaration public static void main(String[] args), this word is the method's name.

What is main?

200

To access the second element of an array named scores, you use...

What is scores[1]?

200

This Java class can read keyboard input when used with System.in.

What is Scanner?

300

This keyword declares a class in Java.

What is class?

300

This punctuation ends an ordinary Java statement.

What is a semicolon?

300

This symbol is commonly used to call a method on an object, as in scanner.nextLine()?

What is the dot operator (.).?

300

Complete the statement to create an integer array with five elements: int[] numbers = ____;

What is new int[5]?

300

This package contains the Scanner class.

What is java.util?

400

This is the conventional name of the method where a standard Java application begins execution.

What is main?

400

What does System.out.println("5" + 3); display?

What is 53?

400

In public static int add(int a, int b), the first int represents... 

What is the method's return type?

400

An array named grades contains 8 elements. This expression gives its length.

What is grades.length (without parentheses)?

400

Complete the import statement: 

import java.util.____;

What is Scanner?

500

public class Main { ... }. If Main is declared public, this should be the source file name. 

What is Main.java?

500

What does this code print?

System.out.print("Java");
System.out.println("Rocks");

 What is JavaRocks, followed by a newline?

500

The difference between defining a method and calling a method.

What is defining a method declares its behavior; calling it executes that method?

500

This code prints...

int[] nums = {10, 20, 30};

System.out.println(nums[2]);

What is 30?
500

What does scanner.nextLine() do when scanner is a Scanner reading keyboard input?

What is reads the next line of text entered by the user?

M
e
n
u