I am trying to have 2D Linked List Array as:
private LinkedList<Integer>[] adjLst;
graph(int n){
noOfNodes = n-1;
for(int i=0;i<=noOfNodes;i++){
adjLst[i] = new LinkedList<Integer>();
}
}
But when i am calling it from my main class as:
graph g =new graph(13);
It is throwing an NullPointerException?