This is the first time that I\'ve seen this kind of syntax :
// class Node public class Node { ... ... } public class Otherclass { ... } Otherclass gra
This is one representation of your for loop
for(int i=0;i
This is not a for loop but still you could do this.
Iterator itr = successors.iterator(); while(itr.hasNext()){ Node myNode = itr.next(); // your logic }