Here is the code
for (int g=1;g < V+1 ;g++) { System.out.println("For LOOP"+g); if (point1 != g){ dis = prim.GetDis(point1, g); System.out.println(point1); System.out.println("g "+ g); System.out.println(dis); if (dis > 0){ g = point[p]; p++; }else{} }else{} }
the output is
For LOOP1
3
g 1
50
For LOOP1
3
g 1
50
For LOOP1
3
g 1
50
For LOOP1
3
g 1
50
For LOOP1
3
g 1
50
I don't know why it continue loop for 1, can you please help me to find out the problem?