This keyword is used to create a new object from a class
What is new?
This variable type stores whole numbers
What is int?
This loop is best when you know exactly how many times something should repeat
What is a for loop?
This method tells you how many characters are in a String.
What is .length()?
This punctuation mark appears at the end of most java statements
What is a semicolon?
A command that prints text to the console and moves to the next line
What is System.out.println()?
What is boolean?
The amount of times this loop will run:
for(int i = 0; i <= 4; i++)
What is 5?
The index that is the first element of every Java array
What is 0?
This symbol denotes a comment
What is //?
This is the name of the method where every Java program starts
What is main?
What is char?
This loop keeps running as long as a condition remains true
What is a while loop?
This is what the code will print:
String word = "Computer";
System.out.println(word.charAt(2));
What is 'm'?
This is how many strings a standard violin has
What is 4?
This is what's wrong with this code:
System.out.println('Hello')
What is: should be double quotations instead of single quotations?
This is the variable type you should use to store 3.14
What is double?
This is what this loop will print:
for(int i = 1; i <= 3; i++)
{
System.out.print(i);
}
What is 123?
This is the printed output:
int[] nums = {5, 8, 2};
System.out.println(nums[1]);
What is 8?
This is a method inside a class that gives you access to private variables
What is an accessor method?
This is what || represents
What is or?
This is the variable type that should be used to store a person's name
What is String?
This is how many times this loop runs:
for(int i = 2; i <= 10; i = i+2)
What is 5?
This is what is printed:
String word = "banana";
System.out.println(word.indexOf("n"));
What is 2?
This is the error in the following code:
if(x = 5)
{
System.out.println("Hi");
}What is = should be ==?