Skip to content

Dijkstra.java:97: cannot find symbol #3

Description

@thequinn

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 pq = new PriorityQueue(new Comparator(){
^
p.s. "^" above points at the keyword "new." It lost it's correct position when I posted the comment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions