Java Quiz Results
Score: 19 of 25
76% Correct:
Question 1:
What is a correct syntax to output "Hello World" in Java?
Question 2:
Java is short for "JavaScript".
Question 3:
How do you insert COMMENTS in Java code?
Question 4:
Which data type is used to create a variable that should store text?
Question 5:
How do you create a variable with the numeric value 5?
Question 6:
How do you create a variable with the floating number 2.8?
Question 7:
Which method can be used to find the length of a string?
Question 8:
Which operator is used to add together two values?
Question 9:
The value of a string variable can be surrounded by single quotes.
Question 10:
Which method can be used to return a string in upper case letters?
Question 11:
Which operator can be used to compare two values?
Question 12:
To declare an array in Java, define the variable type with:
Question 13:
Array indexes start with:
Question 14:
How do you create a method in Java?
Question 15:
How do you call a method in Java?
Question 16:
Which keyword is used to create a class in Java?
Question 17:
What is the correct way to create an object called myObj of MyClass?
Question 18:
In Java, it is possible to inherit attributes and methods from one class to another.
Question 19:
Which method can be used to find the highest value of x and y?
Question 20:
Which operator is used to multiply numbers?
Question 21:
Which keyword is used to import a package from the Java API library?
Question 22:
How do you start writing an if statement in Java?
Question 23:
How do you start writing a while loop in Java?
Question 24:
Which keyword is used to return a value inside a method?
Question 25:
Which statement is used to stop a loop?