File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes strange loop behavior Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "strange loop behavior" Watch "strange loop behavior" New topic

strange loop behavior

Minhaj Mehmood
Ranch Hand

Joined: Jan 22, 2007
Posts: 400

well i know when we left blank the condition statement of for loop is always true.
why its printing "1" in infinity loop??

SCJP6 96% | SCWCD5 81% | SCDJWS5 79%
Minhaj Mehmood
Ranch Hand

Joined: Jan 22, 2007
Posts: 400

ah i get it now, the first part of for loop is always execute once

by the way, i would like to wish happy new year to all
I agree. Here's the link:
subject: strange loop behavior
Similar Threads
pre and postfix operator in for loop
using regular expression Problem
when local machine address is not available ?
for Loop with y++ etc...
Undefined label causing compile error