A part of my code required me to initialize n number of variables. How can it be done. For example

......
.......
XYDataset[] data;
for(int i<0;i<size;i++)
{
data[i]="data"+i;
}
for(int i=0;i<size;i++)
{
XYDataset data[i]=new XYDataset();
}
.......

I think you might understand from the example above what I want to do....I just want to have n number of instance variables of the class XYDataset initialized, so that I can then use it my code....How can I do that....I would really appreciate any help....