Results 1 to 1 of 1
Thread: Priority Queue Question
- 01-29-2009, 03:23 AM #1
Member
- Join Date
- May 2008
- Posts
- 7
- Rep Power
- 0
Priority Queue Question
Hi... Ive just ran into some trouble with some assignment questions and i was wondering if some one could help me?
I would like to know how to read the code and get the outcome?Java Code:PriorityQueue<String> myQ = new PriorityQueue<String>(); myQ .offer("car"); myQ .offer("bike"); myQ .offer("falcon"); myQ .offer("dodge"); myQ .offer("holden"); int queueSize = myQ .size(); for (int i =0; i< queueSize; i++) { System.out.println(myQ.poll()+” \n”); }
Thank you for your help.
Similar Threads
-
How to implement Priority queue with Java
By Java Tip in forum java.langReplies: 0Last Post: 04-12-2008, 08:49 PM -
How to get/set thread priority
By Java Tip in forum java.langReplies: 0Last Post: 04-09-2008, 06:40 PM -
Declaring a Queue
By rhm54 in forum New To JavaReplies: 1Last Post: 03-21-2008, 05:02 AM -
Help with queue array please!!
By vmcg105 in forum New To JavaReplies: 1Last Post: 03-08-2008, 07:03 PM -
Using a queue
By Krmeus in forum New To JavaReplies: 0Last Post: 12-10-2007, 03:38 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks