Printing
Java Math
Datatypes
Code Errors
Random Java Qs
100

The output of the code below:

String s1 = "Hello"

System.out.print(s1 + 15);

What is Hello15?

100
The answer to the Java math problem


39/6

What is 6?

100

The name of the data type that stores the information below:

'M'

What is char?

100

The type of error when code is misspelled or a symbol is missing.

What is syntax error?

100

The name of the class to use in order to input data from the keyboard.

What is Scanner?

200

The output of the following code:

int num = 5;

char letter = 'B';

System.out.print(num + letter);

What is 71?

200

The answer to the Java math problem:

10 + 9 % 3

What is 10?

200

The datatype that results when you add a String and a char together.

What is String?

200

The type of error that occurs when the output isn't what was supposed to happen.

What is logic error?

200
The symbol that is needed after every line of code in Java

What is semi-colon?

300

When the cursor moves to the next line for System.out.println.

What is after printing? 

300

The answer to the Java math problem:

int x = 6;

int y = 10;

Math.max(x, y) + 28 / 5

What is 15?

300

The name of the numeric datatype that can hold the largest numbers without decimals.

What is long?

300

The amount of errors in the code below if the intended output is 9.5 Good Job!

int num1 = 9.5;

string s = "Good Job!"

System.out.printLn("num1" + " " + s);

What is 5?

300

This method is required in all Java programs: 

public static void ______ (String[] args) { ... }

What is main?

400

What is the name of the sequences that allow you to print certain characters such as a tab?

What is escape sequence?

400
The name of the method that returns the answer to a number raised to an exponent.

What is Math.pow?

400

The storage size for long in bits

What is 64 bits?

400
The error in the set up of the Scanner code below:


Scanner input = new Scanner(SystemIn);

What is System.in?

400

The name of the comment at the top of a function.

What is a banner comment?

500

The output of the line of code below:


System.out.println("\\\"/\\/\\\"\"/HEY\\\"");

What is \"/\/\""/HEY\"?

500

The answer to the Java code below:


Math.pow(Math.min(Math.sqrt(121), Math.pow(2, 3)), Math.Max(Math.abs(-4), Math.sqrt(36)))   

What is 262,144?

500

The exact range of the short data type in Java.

(Hint: short stores 2 bytes)

What is -32,768 to 32,767?

500

Scanner k = new Scanner(System.in);

System.out.print("Enter your name: ");

String name = k.nextInt();

What is k.nextInt()?

500
The name of the person who is considered the designer and founder of the Java Programming language.

Who is James Gosling?