java - the number of iterations of >>>> "for(int i=start;i<num;i++)" i -


i'm talking loops in form for(int i=0;i<5;i++)

i expecting increment statement done after check , think wrote programs depending on concept .

the problem when tried run code

`for( int = 0; i<5; i++) {   system.out.println(i); }        

i surprised find doesn't include 5 output 0 1 2 3 4

i'm confused think statments must executed @ order

write i<=5:

  for( int = 0; i<=5; i++) {     system.out.println(i);   }    

output:

 0  1  2  3  4  5    

Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -