Tentando instanciar objetos dentro de loop e falha

Basicamente eu estou tentando criar uma nova classe contanto que a variável continue seja igual a "Y". O problema que estou tendo é

<code>DigitalMain.java:18: not a statement
    DigitalPhoto[] class = new DigitalPhoto[9];
</code>

após compilar. Eu olhei para ArrayLists, mas não tenho certeza se eles instanciariam as aulas da mesma maneira que eu estou tentando alcançar. Em uma situação ideal, eu teria objetos com o nome "class" + i e valores diferentes para cada objeto através de seus métodos internos.

<code>// Import classes for class
import java.util.Arrays;
import java.util.List;
import javax.swing.*;
import java.awt.event.*;
import java.text.DecimalFormat;

public class DigitalMain
{
  public static void main(String args[])
  {
    String cont = "Y";
    String heightString,widthString,width,bitpsString;
    double bitps,x,y,totesPrice,totesSize,totesSpeed;
    DecimalFormat wholeDigits = new DecimalFormat("0");
    DecimalFormat dec = new DecimalFormat("0.00");

    DigitalPhoto[] picc = new DigitalPhoto[20];
    for(int i=0; cont.equals("Y") ; i++)
    {
    picc[i] = new DigitalPhoto();
    heightString = JOptionPane.showInputDialog("Please enter height");
    picc[i].setHeight = Double.parseDouble(heightString);
    heightString = JOptionPane.showInputDialog("Please enter width");
    picc[i].setWidth = Double.parseDouble(widthString);
    continueQuestion = JOptionPane.showInputDialog("Height: " + picc[i].getHeight + "\n Width: " + picc[i].getWidth + "\n Resolution: " + picc[i].getResolution + "\n Compression Ratio: " + picc[i].getCompression + "\n Required Storage: " + picc[i].calcStorage() + "\n Price of Scanned Photo: " + picc[i].getCost() + "Please enter 'Y' to try again or anything but 'Y' to accept values.");
    };


    do
    {
    bitpsString = JOptionPane.showInputDialog("Please enter your internet connection speed. Must be an integer between 1 and 99999999");
    bitps = Double.parseDouble(bitpsString);
    } while (bitps > 0 && bitps < 99999999);
    picc0.setSpeed(bitps);

    for(y = 0; y<picc.length; y++) {
      totesPrice += picc+y.getCost();
      totesSize += picc+y.calcStorage();
      totesSpeed = picc0.getSpeed();
    }

    double seconds = transferTime(totesSize, totesSpeed);
    double minutes = seconds / 60;
    double realsec = seconds % 60;

    JOptionPane.showMessageDialog(null, "You will be paying: " + totesPrice + "\nRequired Storage is: " + totesSize + "Required time for transfer is: " + wholeDigits.format(minutes) + " minutes, and " + wholeDigits.format(realsec) + " seconds.");

  }

  public static double transferTime(double totalStorage, double netSpeed) {
    double bits, seconds;
    bits = (totalStorage * 8);
    seconds = (bits / netSpeed);
    return seconds;
    };
}
</code>

questionAnswers(4)

yourAnswerToTheQuestion