
java programming
Quiz
•
Computers
•
1st - 10th Grade
•
Practice Problem
•
Medium
haritha rani
Used 35+ times
FREE Resource
Enhance your content in a minute
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a comment in the Java language?
/ 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
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
15 questions
Program Implementation
Quiz
•
10th - 12th Grade
17 questions
introduction to programming languages chapter 8
Quiz
•
6th - 8th Grade
15 questions
Начала программирования на языке Паскаль
Quiz
•
8th - 11th Grade
18 questions
C++_Data types and variables
Quiz
•
7th Grade
19 questions
Python Year 9 Quiz
Quiz
•
8th - 10th Grade
15 questions
การเขียนโปรแกรมภาษา
Quiz
•
8th - 9th Grade
17 questions
Estructura de control 1 parcial
Quiz
•
3rd Grade
20 questions
terstruktur
Quiz
•
10th Grade
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade
