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

java programming

Quiz
•
Computers
•
1st - 10th Grade
•
Medium
haritha rani
Used 31+ times
FREE Resource
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 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
30 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 Java data type is used to store 64-bit floating-point numbers?
int
long
float
double
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
The import statement used in Java to access the Scanner class is:
import java.Scanner;
import java.util.Scanner;
import java.package.Scanner
import.java.util.Scanner;
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
To output the square root of 25 in Java using the Math static class, the correct code would be:
Math(25 / 2)
Math(25 % 2)
Math.sqrt(25)
new Math.sqrt(25)
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the problem with this code?
Line 1: String myName = "Mary Jacobson";
Line 2: System.out.println ("My name is " + myname);
Line 2: should be System.out.println ("My name is myName");
Line 2: should be System.out.println ("My name is " ) + myName;
Line 2: should be System.out.display("My name is " + myname);
There is no problem with the code
Create a free account and access millions of resources
Similar Resources on Quizizz
20 questions
SKT4-1.3: PEMBOLEH UBAH, PEMALAR DAN JENIS DATA

Quiz
•
10th - 11th Grade
15 questions
Java Test 1

Quiz
•
10th Grade
20 questions
JAVA FUNDAMENTALS

Quiz
•
9th - 12th Grade
20 questions
Arrays in Java

Quiz
•
9th - 12th Grade
15 questions
JAVA: Level-1

Quiz
•
5th - 12th Grade
16 questions
Java Chapter 1 CS2

Quiz
•
9th - 12th Grade
20 questions
terstruktur

Quiz
•
10th Grade
20 questions
Java Test 1

Quiz
•
8th 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
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
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
30 questions
Linear Inequalities

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