![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Newbie
Join Date: Dec 2007
Posts: 28
Rep Power: 0
![]() |
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 : java Syntax (Toggle Plain Text)
Error : The import java.util.PriorityQueue cannot be resolved Even with java Syntax (Toggle Plain Text)
java Syntax (Toggle Plain Text)
Error : PriorityQueue cannot be resolved to a type What is the problem? |
|
|
|
|
|
#2 |
|
Programming Guru
![]() Join Date: Apr 2005
Posts: 1,799
Rep Power: 5
![]() |
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.
|
|
|
|
|
|
#3 |
|
Newbie
Join Date: Dec 2007
Posts: 28
Rep Power: 0
![]() |
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! |
|
|
|
|
|
#4 |
|
Programming Guru
![]() Join Date: Apr 2005
Posts: 1,799
Rep Power: 5
![]() |
Re: PriorityQueue problem
No problem. Lucky guess.
![]() |
|
|
|
|
|
#5 |
|
Professional Programmer
|
Re: PriorityQueue problem
You need at least Java 1.5
![]()
__________________
http://www.kevinherron.com/ |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| cration of a new control, problem with adding new controls | beni_dude | C# | 5 | Apr 15th, 2008 4:31 PM |
| Challenging Programming Problem - "Pinball Ranking" | Sane | Coder's Corner Lounge | 38 | Jan 15th, 2008 5:16 PM |
| Problem solving | ReggaetonKing | Software Design and Algorithms | 7 | Jan 4th, 2008 1:49 PM |
| Windows Multimedia API - double buffering problem | Brent | C++ | 1 | Dec 21st, 2007 5:52 PM |
| cgi/perl script + IE problem | joyceshee | Perl | 2 | Jan 24th, 2006 11:10 AM |