Simple way to use looping in java : <p>This is example for my looping code:</p>

<pre><code>int outsideLoop = 0;
for (int i = 1; i &lt; 11; i++)
{
    outsideLoop += i;
    System.out.println("Count is: " + i);
}
System.out.println("Outside loop is: " + outsideLoop);
</code></pre>

<p>My friend is said that using <code>int i = 1; i &lt; 11; i++</code> is a primitive ways.
is there any quick way to looping than to use this code?</p>
