
-----------------------------------
grasshopper
Tue Mar 23, 2004 11:22 pm

Loops in Java
-----------------------------------
Does anyone know of a tutorial I can look up on either this site or another site about loops in java.. like for or while.. loops.. things like those.. Or does anyone want to try to explain it to me.. I`m lookig\ng for an example and then a step by step explantationn or something like that...

Thankssss

-----------------------------------
wtd
Wed Mar 24, 2004 12:04 am


-----------------------------------
Loops in Java work pretty much like loops in C.  The folks at Sun who work on Java are all big C geeks.  :-)

// Let's loop three times and print the result each time
// Ignore the boilerplate code.

import java.lang.*;
import java.io.*;

class Test {
   public static void main(String[] args) {
      int i;
      for (i = 1; i 