
Quiz 4: Java Syntax

Quiz
•
Information Technology (IT)
•
Professional Development
•
Hard
MADHURI KETHARI
Used 2+ times
FREE Resource
25 questions
Show all answers
1.
FILL IN THE BLANK QUESTION
1 min • 1 pt
Insert the missing part of the code below to output "Hello World".
public class MyClass {
public static void main(String[] args) {
______.___.________("Hello World");
}
}
2.
FILL IN THE BLANK QUESTION
1 min • 1 pt
Comments in Java are written with special characters. Insert the missing parts:
___This is a single-line comment
___This is a multi-line comment___
3.
FILL IN THE BLANK QUESTION
1 min • 1 pt
Create a variable named carName and assign the value Volvo to it.
____________ _________ = ___________;
4.
FILL IN THE BLANK QUESTION
1 min • 1 pt
Create a variable named maxSpeed and assign the value 120 to it.
____ ___________ = _____;
5.
FILL IN THE BLANK QUESTION
1 min • 1 pt
Display the sum of 5 + 10, using two variables: x and y.
----- ----- = ---- ;
int y = 10;
System.out.println(x + y);
6.
FILL IN THE BLANK QUESTION
1 min • 1 pt
Create a variable called z, assign x + y to it, and display the result.
int x = 5;
int y = 10;
--- -- = x + y;
System.out.println();
7.
FILL IN THE BLANK QUESTION
1 min • 1 pt
Fill in the missing parts to create three variables of the same type, using a comma-separated list:
--- x = 5-- y = 6-- z = 50;
System.out.println(x + y + z);
Create a free account and access millions of resources
Similar Resources on Wayground
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade