Using Priority Queues in java

How do I declare one ? I have a custom class and a custom comparator. The following lines do not compile:

PriorityQueue<path> possiblePaths;

possiblePaths = new PriorityQueue(5,new pathCmp());

I have included java.util.*;

it says "Syntax error on token : '<' remove this token" which doesn't make sense ... isn't that how you declare the templated object?

Thanks

[413 byte] By [SalikSyeda] at [2007-11-27 1:41:46]
# 1
> it says "Syntax error on token : '<' remove this> token" which doesn't make sense ... isn't that how> you declare the templated object? It would be, if you had a Java 5 compiler. Apparently you don't.
DrClapa at 2007-7-12 0:57:31 > top of Java-index,Java Essentials,New To Java...