I'm trying to implement a Graph as an adjacency list, with the code below. I'm getting a raw type error on line 9.
Edit: Just want to clarify, I get an unchecked/unsafe operation error, then when I compile with Xlint, I get the raw type error.
import java.util.LinkedList;
public class AdjListGraph{
private int vertices;
private LinkedList<Integer>[] AdjList;
public AdjListGraph(int v){
this.vertices = v;
AdjList = (LinkedList<Integer>[]) new LinkedList[v];
for (int i = 0; i < v; i++){
AdjList[i] = new LinkedList<Integer>();
}
}