![]() |
PriorityQueue problem
Hello,
I am writing a program which needs at a certain point the use of priority queues. For that I use java.util.PriorityQueue. The problem is that javac refuses to compile my code, and I just don't understand why. For the following code : :
:
Error : The import java.util.PriorityQueue cannot be resolvedEven with :
:
:
Error : PriorityQueue cannot be resolved to a typeWhat is the problem? |
Re: PriorityQueue problem
Some quick googling suggested that maybe you don't have the version of Java which supports Priority Queues. I am not sure, so maybe you could verify that for me, and/or see if there is a version which doesn't support them.
|
Re: PriorityQueue problem
Yup, apparently I don't have the "Java Collections Framework", which includes the PriorityQueue class, which is very weird, because I thought I installed everything java-related.
Well, thanks for pointing it out! |
Re: PriorityQueue problem
No problem. Lucky guess. :)
|
Re: PriorityQueue problem
You need at least Java 1.5 :)
|
| All times are GMT -5. The time now is 4:18 AM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC