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

Popular posts from this blog

python 2.7 - Chat Solution for Mobile App -

jquery - Detect current Section with javascript -