COMP-550-AlgorithmAnalysis icon indicating copy to clipboard operation
COMP-550-AlgorithmAnalysis copied to clipboard

Dijkstra.java:97: cannot find symbol

Open thequinn opened this issue 6 years ago • 0 comments

Hi, I found a potential error when I used the example provided below: /coursera-algorithms-on-graphs/Dijkstra.java

How I executed: javac Dijkstra.java java Dijkstra

Error message: Dijkstra.java:97: cannot find symbol symbol : constructor PriorityQueue(<anonymous java.util.Comparator<Dijkstra.DistNode>>) location: class java.util.PriorityQueue<Dijkstra.DistNode> PriorityQueue<DistNode> pq = new PriorityQueue<DistNode>(new Comparator<DistNode>(){ ^ p.s. "^" above points at the keyword "new." It lost it's correct position when I posted the comment.

thequinn avatar Mar 01 '19 07:03 thequinn