Forums Register Login

Question from withmilk.com

+Pie Number of slices to send: Send
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
+Pie Number of slices to send: Send
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?
Cob is sand, clay and sometimes straw. This tiny ad is made of cob:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 512 times.
Similar Threads
SCPJ 1.4 - Dan's questons.. not clear
Nested members in XML-RPC
jsp:setProperty not working for me.
page 423 question 14. HFSCWCD
How to add page break in table
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 05:58:27.