import java.util.ArrayList; import javax.swing.JOptionPane; public class Arrays { public static void main(String[] args) { JOptionPane.showMessageDialog(null,"Garrett Johnston\nWeek08"); String output=""; int[] x; x = new int[5]; x[1] = 13; x[4] = 8; x[0] = 3; x[2] = 5; JOptionPane.showMessageDialog(null, "A new int array called x was just created.\nIt was loaded with the following numbers: 13, 8, 3, 5.\nTake a look:"); for (int i= 0; i r = new ArrayList(); r.add(new Rectangle()); r.add(new Rectangle()); System.out.println("from arraylist: " + r.get(1).getLength()); ArrayList dd = new ArrayList(); dd.add(4.5); for (int i=1; i<=10;i++) dd.add((Double)(double) i); for (int i=0; i