Skip to content

Instantly share code, notes, and snippets.

@fado
Created June 2, 2014 09:34
Show Gist options
  • Save fado/3d8cc49cdd16f6622032 to your computer and use it in GitHub Desktop.
Save fado/3d8cc49cdd16f6622032 to your computer and use it in GitHub Desktop.
package revision;
import java.util.PriorityQueue;
import java.util.Queue;
public class PriorityQueueRevision {
public static void main(String[] args) {
Queue<Integer> queue = new PriorityQueue<>();
queue.add(26);
queue.add(1);
queue.add(7);
queue.add(9);
queue.add(4);
System.out.println("Queue order "+ queue.toString());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment