Sprite Array, please Help!

Dear everybody,
my code generates NullPointerException after I change the sprite into array, the code is shown below:

private Sprite[] c2;

public GameScreen() {
for (int i=0; i<51; i++) {
Random rand = new Random();
n = Math.abs(rand.nextInt()%52);
coordX = coordX+1;

Graphics g = getGraphics();
render(g);

c2[i] = createCard("/LONGMinicardfull.png");
lm.append(c2[i]);

}
}

The code were built without any error, but it has some exception after I run the program

Thank you very much

u have not initialized the array

c2=new Sprite[51];

I see, thanks :smiley: