
Java Quiz-3
Quiz
•
Engineering
•
University
•
Hard
B Madar
Used 6+ times
FREE Resource
Enhance your content
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
8.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Which data structure does a TreeSet use internally?
LinkedList
Hash Table
Red-Black Tree
Binary Heap
Similar Resources on Wayground
12 questions
Understanding Inheritance in Python
Quiz
•
University
5 questions
Metode Numerik
Quiz
•
University
12 questions
MCQ on Electrical Machine
Quiz
•
University
10 questions
MCQ_ UNIT 1
Quiz
•
University
10 questions
Mastering Python Basics
Quiz
•
University
10 questions
DataScience - 25
Quiz
•
University
7 questions
SELF PRACTICE 2
Quiz
•
University
10 questions
Emerging technologies in image segmentation
Quiz
•
University
Popular Resources on Wayground
20 questions
Brand Labels
Quiz
•
5th - 12th Grade
10 questions
Ice Breaker Trivia: Food from Around the World
Quiz
•
3rd - 12th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
20 questions
ELA Advisory Review
Quiz
•
7th Grade
15 questions
Subtracting Integers
Quiz
•
7th Grade
22 questions
Adding Integers
Quiz
•
6th Grade
10 questions
Multiplication and Division Unknowns
Quiz
•
3rd Grade
10 questions
Exploring Digital Citizenship Essentials
Interactive video
•
6th - 10th Grade
Discover more resources for Engineering
11 questions
NFL Football logos
Quiz
•
KG - Professional Dev...
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)
Quiz
•
8th Grade - University
7 questions
Force and Motion
Interactive video
•
4th Grade - University
36 questions
Unit 5 Key Terms
Quiz
•
11th Grade - University
38 questions
Unit 6 Key Terms
Quiz
•
11th Grade - University
20 questions
La Hora
Quiz
•
9th Grade - University
7 questions
Cell Transport
Interactive video
•
11th Grade - University
7 questions
What Is Narrative Writing?
Interactive video
•
4th Grade - University