I got a code from this site and when i try to run i'm getting error in the HashMap.what's wrong with this?do i need to import anything?
import java.util.*;
public class Graph {
private HashMap<String, Vertex> myVertices;
private HashMap<Vertex, TreeSet<Vertex>> myAdjList;
private static final TreeSet<Vertex> EMPTY_SET = new TreeSet<Vertex>();
public static final int INFINITY = Integer.MAX_VALUE;
}
Error is
Graph1.java:19: error: cannot find symbol
private HashMap<String, Vertex> myVertices;
^
symbol: class Vertex
location: class Graph1
Graph1.java:24: error: cannot find symbol
private HashMap<Vertex, TreeSet<Vertex>> myAdjList;