About 30,100,000 results
Open links in new tab
  1. Queue Interface In Java - GeeksforGeeks

    Apr 18, 2025 · In Java, the Queue interface is a subtype of the Collection interface and represents a collection of elements in a specific order. It follows the first-in, first-out (FIFO) principle. This means that the elements are retrieved in the order in which they were added to the queue.

  2. Guide to the Java Queue Interface - Baeldung

    Jan 8, 2024 · In this tutorial, we’ve taken a deep dive into the Java Queue interface. Firstly, we explored what a Queue does, as well as the implementations that Java provides. Next, we looked at a Queue’s usual FIFO principle, as well as the PriorityQueue which differs in its ordering.

  3. Java Queue - Queue Methods, Queue Implementation & Example

    Apr 1, 2025 · How To Use A Queue In Java? To use a queue in Java, we must first import the queue interface as follows: import java.util.queue; Or. import java.util.*; Once this is imported, we can create a queue as shown below: Queue<String> str_queue = new LinkedList<> ();

  4. Java Queue tutorial - W3schools

    Queue use one end to insert data which is called REAR or tail and other end to remove the data which is called FRONT or head. enqueue (): Insert an item to the queue. dequeue (): Remove an item from the queue. peek (): Get the top data element of the queue, without removing it. isFull (): Check if queue is full. isEmpty (): Check if queue is empty.

  5. Java Queue: From Fundamentals to Mastery - HowToDoInJava

    Aug 3, 2023 · Learn Queue data structure and the Java Queue interface and implementations with practical examples such as LinkedList, PriorityQueue and ArrayDeque.

  6. Java Queue Interface - Programiz

    The Queue interface of the Java collections framework provides the functionality of the queue data structure. It extends the Collection interface.

  7. Mastering Java Queue: A Comprehensive Guide to Queue Data …

    Learn how to effectively use Queue in Java with practical examples, error fixes, and best practices for beginners and advanced users.

  8. Java Queue Example (with video) - Java Code Geeks - Examples Java

    Apr 8, 2014 · Check out our detailed example about Java Queue and Priority queue in Java, where we can keep and handle elements before processing.

  9. Queue Java Example - Java Code Geeks

    May 31, 2023 · To create a queue in Java, we can use the Queue interface, which is implemented by various classes like LinkedList and PriorityQueue. Here’s an example of creating a queue using LinkedList : Queue<String> queue = new LinkedList<>();

  10. Java Queue - Jenkov.com

    Apr 20, 2020 · Here are a few examples of how to create a Queue instance: In most Queue implementations the head and tail of the queue are at opposite ends. It is possible, however, to implement the Queue interface so that the head and tail of the queue is in the same end. In that case you would have a stack.

  11. Some results have been removed
Refresh