
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
20 questions
Round 2

Quiz
•
University
20 questions
Unit 10 Vocabulary Quiz

Quiz
•
6th Grade - University
25 questions
Data Structures

Quiz
•
University
24 questions
Legal Maxim 1

Quiz
•
University
25 questions
Розробка клієнт-серверних застосувань

Quiz
•
University
20 questions
Java Programming Quiz for swapna

Quiz
•
University
18 questions
Repaso Programacion I

Quiz
•
University
20 questions
Round 1

Quiz
•
University
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

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

Quiz
•
5th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
US Constitution Quiz

Quiz
•
11th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Other
10 questions
Would you rather...

Quiz
•
KG - University
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)

Quiz
•
8th Grade - University
7 questions
Force and Motion

Interactive video
•
4th Grade - University
10 questions
The Constitution, the Articles, and Federalism Crash Course US History

Interactive video
•
11th Grade - University
7 questions
Figurative Language: Idioms, Similes, and Metaphors

Interactive video
•
4th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
16 questions
Water Modeling Activity

Lesson
•
11th Grade - University
10 questions
ACT English prep

Quiz
•
9th Grade - University