Search:

Type: Posts; User: ice

Search: Search took 0.07 seconds.

  1. Replies
    7
    Views
    2,356

    Re: What can be legally inside FOR statement?

    ok, what about there are many lines of statements under for(int i = 0; i <= 5; ++i), EG.:

    for(int i = 0; i <= 5; ++i)
    System.out.println(i); // statements A
    ........................;...
  2. Replies
    7
    Views
    2,356

    Re: What can be legally inside FOR statement?

    :) I see....Thanks a lot for the explanation.
    so is still a kind of loop, but doesn't statement need to be wrapped inside a pair of {}? (otherwise how could it know which statement is the thing...
  3. Replies
    7
    Views
    2,356

    What can be legally inside FOR statement?

    Hi guys

    I have a question for how many ways to use FOR statement?
    I thought FOR is only used in starting a loop, like below two forms:
    for (initialization; termination; increment) or For each...
Results 1 to 3 of 3