mercredi 4 mars 2015

int cannot be deferenced in my code


public boolean checkPath(LinkedList <Integer> path,int curNode)
{
LinkedList list = path;
curNode= path.getFirst();
boolean pathOk==true;

while (!path.isEmpty() && pathOk)
{
int nextNode;
nextNode = path.getFirst();
if (!nextNode.isNeighbor())
{
pathOk = false;
curNode = nextNode;
}

}
}


i am getting int cannot be dereferenced error in my if statement......any help would be highly appreciated


Aucun commentaire:

Enregistrer un commentaire