// Simple loop example in Java

public class SimpleLoop {

    public static void main(String[] args) {

        int counter = 1;
        while (counter <= 100) {
            System.out.println(counter);
            counter = counter + 1;
        }
    }
}

© 2012 CS160 Colorado State University. All Rights Reserved.