0

How can I create array of data type linegraphseries of ten members. Some thing like:

LineGraphSeries<DataPoint> series1 = new LineGraphSeries<DataPoint>(new DataPoint[] {});

to:

LineGraphSeries<DataPoint>[] series1 = new LineGraphSeries<DataPoint>(new DataPoint[] {})[10];

But this code not working.

SWIK
  • 714
  • 7
  • 12

1 Answers1

0

It looks like you cannot create an array for a parameterized type, but you can create an ArrayList of LineGraphSeries like this:

ArrayList<LineGraphSeries<DataPoint>> series = new ArrayList<>(3);
double-beep
  • 5,031
  • 17
  • 33
  • 41