class BallData{
boolean flag;
int iX,iY,iDisX,iDisY;
Color color;
BallData(boolean flag,int iX,int iY,int iDisX,int iDisY,Color color){
this.flag = flag;
this.iX = iX;
this.iY = iY;
this.iDisX = iDisX;
this.iDisY = iDisY;
this.color = color;
}
}
のインスタンスを配列化するとき

BallData[] ball = new BallData[]{
new BallData(true,0,0,1,1,Color.orange),
new BallData(true,200,100,1,0,Color.blue),
};
は上手く行って

BallData[] ball = new BallData[5];
ball[0] = new BallData(true,0,0,1,1,Color.orange);
ball[1] = new BallData(true,200,100,1,0,Color.blue);

だとコンパイルエラーになったんだけど、下の書き方はどこが間違っていますか?
ホームページでクラスの配列とかで検索するとよく下のような書き方がでてきます。