Unit 1
Unit 2
Unit 3
Unit 5
Code
100

________ refers to the physical devices computers are made of.

Hardware

100

_________ are the fundamental building blocks of Java programs. They are templates that are used to create objects.

Classes 

100

_____________ operators are used to perform common mathematical operations. They include addition, subtraction, multiplication, and division. 

Arithmetic 

100

A ________ data type stores text.

String

100

What is the output:

String exam = "100";

System.out.print(exam); 

100
200

What’s does RAM stand for? 

Random Access Memory 

200

Every Java application / program must have a _____________________. It can also only have one. 

Main method 

200

The ___________ operator in Java is denoted by the percent symbol %

Modulus (or remainder) 

200

A String in Java is what we call an ________. This means it contains methods that can perform certain operations on Strings.

object
200

What is the output:

String exam = 100;

System.out.print(exam);

ERROR!!

300

A __________ is a program that translates a high-level language program into a separate machine language program.

Compiler 

300

byte, short, int, long, float, double, boolean and char are all grouped into what category of data types? 

Primitive Data Types 

300

Solve this. 

System.out.println((5 % 2) + 20 - 3 * 2);

15 

300

You can find out the length of a String by using which method?

length()

300
What is the line of code used to create a Scanner object? 

Scanner objectName = new Scanner(System.in);

//objectName can be any valid identifier

400

How many bits are in a byte? 

400

The _________ class is used to get user input, and it is found in the java.util package.

Scanner 

400

Solve this. 

System.out.print(Math.sqrt(64));

8.0 (must be in decimal form) 

400

When we count the number of characters in a String, we count ______________ inside the double quotes including whitespace.

everything

400

What is the output?

System.out.print("Hello "); 

System.out.println("from the other side..."); 

System.out.print("hey."); 

Hello from the other side....

hey. 

500

____________ is the state of being protected against the criminal or unauthorized use of electronic data, or the measures taken to achieve this

Cybersecurity 

500

____________________ MUST be used inside a string - so they should be placed inside the double quotes of a print statement.

System.out.print(“Hello!\nGoodbye!”);

Escape Sequence or Escape Character 

500

Debugging is the process of identifying and removing errors from computer hardware or software.

Debug this. 

System.out.print(The Sun Also Rises); 

Missing quotation marks 

500

What is the output?

String message = "Please locate where 'locate' occurs!";

System.out.println(message.indexOf("locate"));

7

500

What is the output?

System.out.println("Hello\nWorld\n!");

System.out.print("Hello Mars !");

System.out.print(" Hello Saturn! "); 

Hello

World

!

Hello Mars ! Hello Saturn! 

M
e
n
u