Which of the following is a comment in the Java language?
Programming in Java

Quiz
•
Computers
•
8th Grade
•
Medium
Adya Dalela
Used 472+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
/ comment /
//comment
/ comment */
<-- comment -->
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is the correct main() method signature in Java?
public static void main (String [] args)
public static void Main (String [] args)
public static void main (string [] args)
public static void main (String args)
3.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Which of the following is a valid variable declaration in Java?
int 1myInteger = 0;
int int = 0;
Int my Integer = 0;
int myInteger = 0;
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of this command does not have errors?
System.out.print("Hello World")
System.out.print(Hello World);
System.out.Print("Hello World);
System.out.print("Hello World");
5.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What will be output of below program?
public class Test {
public static void main(String[] args) {
int x = 10*20-20;
System.out.println(x);
}
}
Runtime Error
Prints 180
Prints 0
None of the above
6.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What is the output for the following statement:
System.out.print("1"+"1");
11
2
Error Message
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Indicate the actual output of the statements below:
int thisYear = 2020;
System.out.println("The current year is "+thisYear);
The current year is thisYear
The current year is 2020
No output; an error exists
The current year is
Create a free account and access millions of resources
Similar Resources on Quizizz
10 questions
Introduction to Arrays

Quiz
•
KG - University
10 questions
Week 3 Arduino Basics Quiz

Quiz
•
7th - 12th Grade
11 questions
Java 1

Quiz
•
6th - 8th Grade
11 questions
Java1

Quiz
•
6th - 11th Grade
10 questions
Java Math

Quiz
•
1st - 12th Grade
10 questions
Программирование C#

Quiz
•
1st - 10th Grade
10 questions
Control Structures in Java

Quiz
•
8th Grade
10 questions
Programming

Quiz
•
1st - 10th Grade
Popular Resources on Quizizz
15 questions
Character Analysis

Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
10 questions
American Flag

Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25

Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade
Discover more resources for Computers
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade
17 questions
Parts of Speech

Quiz
•
7th - 12th Grade
10 questions
Identifying equations

Quiz
•
KG - University
44 questions
El fin del año- 7th

Quiz
•
7th - 12th Grade
40 questions
Word Study Assessment: Roots, Prefixes, Suffixes, and Vocabulary

Quiz
•
8th Grade
17 questions
guess the logo

Quiz
•
8th Grade
16 questions
Function or Non-Function?

Quiz
•
8th - 10th Grade
15 questions
Sentence Fragments and Run-ons

Quiz
•
8th Grade