
Java Programming Quiz

Quiz
•
Other
•
University
•
Hard

Niveditha N
Used 2+ times
FREE Resource
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
Create a free account and access millions of resources
Similar Resources on Wayground
25 questions
Conceptos básicos de C++

Quiz
•
University
17 questions
Devil fruit quiz

Quiz
•
6th Grade - Professio...
20 questions
Quiz-1

Quiz
•
University - Professi...
20 questions
Introduction to JAVA Quiz

Quiz
•
University
26 questions
Sethu Testing C#

Quiz
•
University
20 questions
Java Programming Quiz

Quiz
•
University
22 questions
PRP161 Day 1

Quiz
•
University
21 questions
PRO192_part6

Quiz
•
University
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
Appointment Passes Review

Quiz
•
6th - 8th 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
20 questions
Grammar Review

Quiz
•
6th - 9th Grade
Discover more resources for Other
15 questions
Disney Trivia

Quiz
•
University
21 questions
Spanish-Speaking Countries

Quiz
•
6th Grade - University
7 questions
What Is Narrative Writing?

Interactive video
•
4th Grade - University
20 questions
Disney Trivia

Quiz
•
University
7 questions
Force and Motion

Interactive video
•
4th Grade - University
5 questions
Examining Theme

Interactive video
•
4th Grade - University
23 questions
Lab 4: Quizziz Questions

Quiz
•
University
12 questions
Los numeros en español.

Lesson
•
6th Grade - University