import java.io.PrintWriter; public class Example { public static void main(String[] args) { int[] stuff = { 5, 1, 2, 4, 8 }; PrintWriter pen = new PrintWriter(System.out, true); for (int i: stuff) { pen.println(i + " squared is " + i*i); } // for } // main } // class Example