File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

FOR LOOP

 
amir zaheer
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i m new to java and trying to lern the basics. i have understood
what FOR LOOP is but i cant understand the logic to put while mking a programme
i have tried to understand from different books how the FOR LOOP
works but cant mke programme as i desire
can any one send me detailed and simple notes to understand FOR LOOP operation
thanks
amir
 
Greg Harris
Ranch Hand
Posts: 1012
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

compile and run this... it counts from 1 to 10 because of the for loop.
"i is set to "1"
for( int i = 1 ;
and is incremented by 1 each "loop"
i++ );
until it is "<= 10"
i <= 10 ;
then the loop terminates.

[This message has been edited by Greg Harris (edited August 14, 2001).]
 
Johannes de Jong
tumbleweed
Bartender
Posts: 5089
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi amir I'm moving this topic to "Java in General (Beginner)" forum.
Good luck learning java
good catch though Greg
 
Marilyn de Queiroz
Sheriff
Posts: 9059
12
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you see the link on the assignment page about for loops?
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic