This is my node class:
public class Node
{
public int label;
public boolean visited=false;
public Node(int one)
{
this.label=one;
}
}
This is what I'm trying to do but it's giving me an error:
for(int n=0;n<=Nodes;n++)
{
Node name+n = new Node(n);
}
Cannot convert node to int. Is there any other way I can generate 4 different named nodes? This is a adjacency matrix to graph. Thanks!!!