Using the Random class, this method is used to generate a random whole number
What is Random.nextInt()?
This Java keyword is used to define a decision-making structure, where different code blocks are executed based on a specific condition
What is "if/switch"?
What code editor are we using?
What is IntelliJ?
The output of:
if (5 * 7 < 4 * 9) return true; else return false;
What is true?
What is it called when you combine two strings together and what operator do you use?
What is concatenation and the "+" operator?
What is a "semicolon"?
____ is a keyword that comes after an if statement when the first if statement is not ran.
What version of Java are we using?
Java 16
this prints out something to the console
What is System.out.println() or System.out.print()?
Explain what the modulus operator does?
It returns the remainder of a division of two numbers.
The Java syntax for creating a single line comment
What is "two forward slashes"? (//)
This Java keyword is used to skip the rest of the code inside of a loop and immediately proceed with the next iteration
What is "continue"?
What does the void keyword mean?
Void means nothing and is commonly used in functions to indicate that the function should not return anything.
If you name your Scanner scanner, this piece of code will read a double entered by a user
What is "scanner.nextDouble()?
This Java keyword is used to immediately terminate the execution of a loop, executing the next section of code after the loop
What is "break"?
What is the difference between naming classes and naming variables or functions?
Classes should start with an uppercase letter (Upper camel case), whereas variables should start with a lowercase letter (lower camel case). Each word after the first word in the variable or class name should be capitalized.
The names of 3 primitive data types for numbers in Java
What is short/int/long/float/double?
How do you create a for loop that starts at 10 and goes down to (and includes) 0?
for (int i = 10; i >= 0; i--) { ... }
This is the process of converting a variable from one data type to another
What is "casting"/"type-casting"?
What must you add to specify to Java that a block of code belongs to a part of a conditional statement, loop, function, class, etc.?
AND, do indentations matter in Java??
You need to write brackets to organize and group your code. Indentations do not matter syntactically but good indentations make your code easier to read.
When was Java invented? +/- 3 years
What is 1995?