// Allison Obourn // a couple for loop examples public class Loops { public static void main (String[] args) { rocket(); } // print the first 12 squares public static void printSquares() { // parts of the for loop are places on different lines // so that the debugger will show th order they get // executed in for(int i = 1; i <= 6; i++) { System.out.println(i + " squared = " + i * i); } } // displays the following text // T-minus 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, blastoff! // The end. public static void rocket() { System.out.print("T-minus "); for(int i = 10; i >= 1; i--) { System.out.print(i + ", "); } System.out.println("blastoff!"); System.out.print("the end"); } /* displays the following text ****1 ***2 **3 *4 5 */ public static void complex() { } }