Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 5 of 5

Thread: loop in java

  1. #1
    Banned
    Join Date
    Mar 2011
    Location
    uk
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default loop in java

    I want to learn loop in java please tell me about loop. I am thankful to you for this kindness.


  2. #2
    Grand Poobah
    Join Date
    Mar 2011
    Posts
    1,545
    My Mood
    Grumpy
    Thanks
    0
    Thanked 167 Times in 158 Posts

    Default Re: loop in java

    Damn! Google is broken again.

  3. #3
    mmm.. coffee JavaPF's Avatar
    Join Date
    May 2008
    Location
    United Kingdom
    Posts
    3,336
    My Mood
    Mellow
    Thanks
    258
    Thanked 294 Times in 227 Posts
    Blog Entries
    4

    Default Re: loop in java

    Hello jonnitwo,

    Don't forget about this - Java Code Snippets and Tutorials
    There are lots of code examples there.

    These links should help you -

    http://www.javaprogrammingforums.com...ava-loops.html

    http://www.javaprogrammingforums.com...op-tricks.html
    Please use [highlight=Java] code [/highlight] tags when posting your code.
    Forum Tip: Add to peoples reputation by clicking the button on their useful posts.

  4. #4
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,424
    My Mood
    Hungover
    Thanks
    144
    Thanked 636 Times in 540 Posts

    Default Re: loop in java

    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  5. #5
    Junior Member
    Join Date
    Jul 2011
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: loop in java

    Loop in Java has same syntax as C. If you want to perform same operation many times than you have to write those line many times. But after invetion of Loop ther is no need to do this. We can write this code in loop and make it to repeat how many time we want. For that syntax is
    for(int i=0;i<5;i++)
    {
    println(i);
    }

    So in this case your loop iterate 5 times and print 0 to 4.

Similar Threads

  1. Java Do..while loop problem
    By jwill22 in forum Loops & Control Statements
    Replies: 4
    Last Post: November 13th, 2010, 04:02 AM
  2. problems with loop in Java App
    By dmonx in forum What's Wrong With My Code?
    Replies: 0
    Last Post: March 13th, 2010, 04:13 PM
  3. Java Loop and more Practical Programs
    By mparthiban in forum Loops & Control Statements
    Replies: 0
    Last Post: March 6th, 2010, 01:39 AM
  4. for loop in java
    By kissmiss in forum Loops & Control Statements
    Replies: 1
    Last Post: December 16th, 2009, 03:47 AM
  5. JAVA for loop
    By tazjaime in forum Loops & Control Statements
    Replies: 2
    Last Post: August 18th, 2009, 07:43 PM