________ refers to the physical devices computers are made of.
Hardware
_________ are the fundamental building blocks of Java programs. They are templates that are used to create objects.
Classes
_____________ operators are used to perform common mathematical operations. They include addition, subtraction, multiplication, and division.
Arithmetic
A ________ data type stores text.
String
What is the output:
String exam = "100";
System.out.print(exam);
What’s does RAM stand for?
Random Access Memory
Every Java application / program must have a _____________________. It can also only have one.
Main method
The ___________ operator in Java is denoted by the percent symbol %
Modulus (or remainder)
A String in Java is what we call an ________. This means it contains methods that can perform certain operations on Strings.
What is the output:
String exam = 100;
System.out.print(exam);
ERROR!!
A __________ is a program that translates a high-level language program into a separate machine language program.
Compiler
byte, short, int, long, float, double, boolean and char are all grouped into what category of data types?
Primitive Data Types
Solve this.
System.out.println((5 % 2) + 20 - 3 * 2);
15
You can find out the length of a String by using which method?
length()
Scanner objectName = new Scanner(System.in);
//objectName can be any valid identifier
How many bits are in a byte?
8
The _________ class is used to get user input, and it is found in the java.util package.
Scanner
Solve this.
System.out.print(Math.sqrt(64));
8.0 (must be in decimal form)
When we count the number of characters in a String, we count ______________ inside the double quotes including whitespace.
everything
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.
____________ is the state of being protected against the criminal or unauthorized use of electronic data, or the measures taken to achieve this
Cybersecurity
____________________ 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
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
What is the output?
String message = "Please locate where 'locate' occurs!";
System.out.println(message.indexOf("locate"));
7
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!