java - What declaration turns the below loop into infinite loop? -
place declaration i
@ line 3 loop becomes infinite loop.
public class puzzel3 { public static void main(string[] args) { // line 3 while (i == + 1) { system.out.println(i); } system.out.println("done"); } }
double i=1/0.0;
it turn loop in infinite
Comments
Post a Comment