• Post Reply Bookmark Topic Watch Topic
  • New Topic

Question from withmilk.com  RSS feed

 
Jamie Shi
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could anyone tell me why the for clause never gets executed?
<%for(int i=10;i<6;i--)
out.println(i + "<br>");%>

Thanks in advance!
Jamie
SCJP2
 
Mark Howard
Ranch Hand
Posts: 285
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Unless I'm missing something...
The value of i starts with 10. This is not less than 6. The for loop shouldn't execute.
Or are you asking whether the for loop itself is actually reached in the code?
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!