COMP-550-AlgorithmAnalysis
COMP-550-AlgorithmAnalysis copied to clipboard
Dijkstra.java:97: cannot find symbol
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.