|
-
August 10th, 2011, 03:05 PM
#1
How to automate the initialization of variables
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....
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|