
Java Quiz-3
Authored by B Madar
Engineering
University
Used 6+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
8 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Which of the following Set interface depends on the compareTo() method for ordering and detecting duplicates?
HashSet
TreeSet
LinkedHashSet
None
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the code given below?
[12, 13]
[13, 14]
compilation error: parameter needs to be passed to remove() method
[12, 13, 14]
3.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
Choose TWO correct options.
order.add("Pizza");
order.add('Pizza');
order.add(123);
order.add(null);
4.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
What will happen if two threads try to access the same synchronized method at the same time?
Both threads will execute the method simultaneously
One thread will wait while the other executes
Both threads will be blocked
An exception will be thrown
5.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Which method is used to pause a thread for a specified time?
wait()
sleep()
pause()
suspend()
6.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Which of the following methods are used for interthread communication in Java?
sleep(), join(), yield()
run(), start(), stop()
pause(), resume(), restart()
wait(), notify(), notifyAll()
7.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
What is returned by the peek() method of a Queue?
The head element is removed.
The head element is retrieved without removing it
The tail element is removed.
The Last element is removed
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
10 questions
engineers day
Quiz
•
University
10 questions
TUTORIAL 4-BEARING_Part A
Quiz
•
University
10 questions
Wind Systems and Types
Quiz
•
12th Grade - University
11 questions
Chapter 15 - Powder Metallurgy
Quiz
•
University
12 questions
Mini Quiz English for Engineer
Quiz
•
University
10 questions
COA-Introduction-Assessment
Quiz
•
University
11 questions
Equilibrium & Truss
Quiz
•
University
10 questions
Unit 2: Microcontrollers
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 Engineering
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