خرید بک لینک

Vote count: 0

I have read many posts about updating a certain value in an ArrayList, when the ArrayList is single column. In my case, I have a multi-column ArrayList which is done by using the following JAVA code.

Class A{
           private List<double[]> ArrayList;

           double[] _array = {0.0, 1.0};
           ArrayList.add(_array);

           _array = {2.0, 5.0};
           ArrayList.add(_array);

           _array = {3.0, 8.0};
           ArrayList.add(_array);
}

Then my ArrayList looks like, {0.0, 1.0} {2.0, 5.0} {3.0, 8.0}

My problem is: I tried to replace the number 8.0 with a new number. And I don't think I can use "ArrayList.set(2, 8.0)" to achieve the goal, since it only works well when the ArrayList has a single column.

Any feedback and Idea are welcome.

asked 50 secs ago

برچسب: نویسنده: استخدام کار تاريخ: شنبه 9 مرداد 1395 ساعت: 4:53

صفحه بندی