
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
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
Create a free account and access millions of resources
Similar Resources on Wayground
25 questions
Java Review

Quiz
•
9th Grade - University
25 questions
Programacion JAVA I

Quiz
•
3rd Grade
23 questions
Java conditional/loop/method/user input

Quiz
•
9th - 12th Grade
15 questions
Edublocks yr 8

Quiz
•
7th Grade
25 questions
java basics

Quiz
•
KG - 1st Grade
18 questions
Підсумкове оцінювання № 1. Мова програмування Java

Quiz
•
7th Grade
19 questions
Java 1.1. Знакомство с языком программирования Java

Quiz
•
1st Grade
15 questions
KUIS Tipe Data, Variabel, Konstanta, Operator, dan Ekspresi

Quiz
•
10th - 12th Grade
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

Interactive video
•
10th - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
8 questions
Time Management

Quiz
•
6th Grade
15 questions
Acceptable Use Policy (Quiz)

Quiz
•
6th - 8th Grade
25 questions
Career Vs. Job

Quiz
•
6th - 8th Grade
12 questions
3-5 Digital Citizenship: Appropriate Use

Quiz
•
3rd - 5th Grade
10 questions
Keyboard Typing

Quiz
•
4th Grade
10 questions
1.2 OSI & TCP IP Models Quiz

Quiz
•
10th Grade
20 questions
Digital Citizenship

Quiz
•
8th - 12th Grade