Question
Consider the following Java code snippet: import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.PriorityQueue; public class HeapQuestion10 { public static void main(String[] args) { List numbers = Arrays.asList(7, 2, 9, 1, 5); PriorityQueue pq = new PriorityQueue<>(numbers); // Initialize with a collection System.out.println(pq.poll()); System.out.println(pq.poll()); System.out.println(pq.poll()); } } What will be the output of this program?
More IT Operating System Questions
- What is the relationship between the Java Virtual Machine (JVM) and the Java Runtime Environment (JRE)?
- The OS component responsible for managing memory, processes, devices, and files is called:
- What are the 3v’s of Big Data?
- A page has 2^12-byte size and a logical address is 32 bits. How many bits identify the page number?
- Which of the following protocol is a network layer protocol and used for reporting errors?
- In a RESTful API, which HTTP method is idempotent and is typically used to update or completely replace an existing resource at a specific URI?
- Abstraction in OOP primarily focuses on:
- Which of the following is a multi-user, multi-tasking Operating System?
- Which of the following programming language most of “Wireshark” is implemented in?
- Consider the following Python code: import re text = "apple, banana, cherry. apple pie, banana split." pattern = r"\bapple\b|\bbanana\b" matches = re.f...
Hey! Ask a query
Please enter email id
The email must be a valid email address.
Please enter Mobile Number
Please enter valid Mobile Number
Please enter your Doubt
Think You're Ready for RBI Grade B?
RBI Grade B 2026 Phase 1 Memory Based Paper
- 200 Questions with Detailed Solutions
- Section-wise Coverage (GA, English, Quant & Reasoning)