
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
23 questions
INSU 211 (Ch.1)
Quiz
•
University
20 questions
Quiz 1 Introduction to Financial Accounting
Quiz
•
University
20 questions
Information Security Awareness
Quiz
•
University - Professi...
20 questions
Techotsav
Quiz
•
University
20 questions
Commercial Law - MCQs
Quiz
•
University
20 questions
Immunoloจึ้ง
Quiz
•
University
22 questions
Y10 Neurons & Synaptic Transmission
Quiz
•
9th Grade - University
20 questions
SPS113: TUTORIAL 7
Quiz
•
University
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
Discover more resources for Other
12 questions
IREAD Week 4 - Review
Quiz
•
3rd Grade - University
23 questions
Subject Verb Agreement
Quiz
•
9th Grade - University
7 questions
Force and Motion
Interactive video
•
4th Grade - University
7 questions
Renewable and Nonrenewable Resources
Interactive video
•
4th Grade - University
5 questions
Poetry Interpretation
Interactive video
•
4th Grade - University
19 questions
Black History Month Trivia
Quiz
•
6th Grade - Professio...
15 questions
Review1
Quiz
•
University
15 questions
Pre1
Quiz
•
University
