This is the print statement in Java
What is System.out.println()?
For a if statement to run the inside condition must be this
What is true?
There are this many types of loops
What is the number 2?
Java is this type of language
what is a programming language?
System.out.println("Hello");
What is Hello?
This type of variable is used to store decimals
What is a double?
This is the expression used to compare two numerical values
What is the double equal sign (==)?
This is the main difference between a for loop and a while loop
What is the format?
These are used to make notes and explain code to other people Java without effecting the program
What are comments?
int number = 10;
if (number > 0) {
System.out.println("The number is positive.");
}
else {
System.out.println("The number is negative.");
}
What is The number is positive?
What is a boolean?
This is the kind of statement gives you the most number of options (3 total)
What is an else-if statement ?
A loop will continue to run until the inside condition is this
This type of error is most common in Java
What is a syntax error?
int result = 20;
result *= 2;
result /= 5;
result += 2;
result %= 8;
System.out.print(result);
What is the number 2?
This type of variable is used to store words and phrases
What is a String?
These are the names of the three logical operators used in Java.
What are and(&&), or(||) , not(!)
x++;
The purpose of this code segment is to
What is increase the value of x by 1?
This phrase is used to describe a specific letter or character
What is a character?
int number = 10;
if (number > 0 && number <= 10) {
System.out.println("Hi");
}
else if (number > 10 && number <= 20) {
System.out.println("Hello");
}
else {
System.out.println("Bye");
}
What is Hi?
This is what it's called when you change one variable type into another
What is type casting?
This is what to use when you want to see if two Strings have the same letters in the same order
What is the equals() method?
The number of parts that make up a loop
What is the number 3 (initialization, condition, and change)?
This term is used to describe the % symbols in Java
What is modulo?
int x = 1;
int sum = 0;
while (x <= 3) {
sum += x;
x++;
}
System.out.println(sum);
What is the number 6?