
Java Programming Quiz
Quiz
•
Other
•
University
•
Practice Problem
•
Hard
Niveditha N
Used 2+ times
FREE Resource
Enhance your content in a minute
22 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Which of the following is not a valid Java identifier?
_main
$value
9data
data_9
2.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
What is the result of the following? System.out.println(10 + 20 + "30" + 40 + 50);
30304050
30204050
303050
303040
3.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Which of the following is a correct way to assign a float value?
float f = 10.2;
float f = 10.2f;
float f = (float)10.2;
Both B and C
4.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
What will this print? int x = 5; System.out.println(x++ + ++x);
11
12
13
10
5.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
What is the output? int x = 0; if (x == 0) x = 1; if (x == 1) x = 2; else x = 3; System.out.println(x);
2
3
1
Compile-time error
6.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
What will be the result of this code? int arr[] = new int[5]; System.out.println(arr[0]);
0
null
Garbage value
Error
7.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Which of the following returns true? String s1 = "Java"; String s2 = new String("Java");
s1 == s2
s1.equals(s2)
Both
None
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
20 questions
Unit 3
Quiz
•
University
20 questions
BioPsych: Nerve Cells, Neural Signals & Communications
Quiz
•
University
20 questions
Fundamentals of Control System
Quiz
•
University
20 questions
Malaysian Legal System
Quiz
•
University
23 questions
chirstmas
Quiz
•
3rd Grade - University
20 questions
ULANGAN HARIAN BAHASA INDONESIA XI MENGHADAPI UAS GANJIL
Quiz
•
University
20 questions
Module 8: State and Non-state Institutions
Quiz
•
11th Grade - University
20 questions
Power Amplifier
Quiz
•
University
Popular Resources on Wayground
5 questions
This is not a...winter edition (Drawing game)
Quiz
•
1st - 5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
Identify Iconic Christmas Movie Scenes
Interactive video
•
6th - 10th Grade
20 questions
Christmas Trivia
Quiz
•
6th - 8th Grade
18 questions
Kids Christmas Trivia
Quiz
•
KG - 5th Grade
11 questions
How well do you know your Christmas Characters?
Lesson
•
3rd Grade
14 questions
Christmas Trivia
Quiz
•
5th Grade
20 questions
How the Grinch Stole Christmas
Quiz
•
5th Grade
Discover more resources for Other
26 questions
Christmas Movie Trivia
Lesson
•
8th Grade - Professio...
20 questions
christmas songs
Quiz
•
KG - University
20 questions
Holiday Trivia
Quiz
•
9th Grade - University
15 questions
Holiday Movies
Quiz
•
University
14 questions
Christmas Trivia
Quiz
•
3rd Grade - University
20 questions
Christmas Trivia
Quiz
•
University
8 questions
5th, Unit 4, Lesson 8
Lesson
•
KG - Professional Dev...
20 questions
Disney Trivia
Quiz
•
University
