mars123
12-06-2007, 07:09 AM
I have an arraylist as below:
ArrayList listArray = new ArrayList();
listArray.add("Germany");
listArray.add("Holland");
listArray.add("Sweden");
listArray.add("India");
Now i want to convert this list or add the above elements of the list to an two-dimensional array as below:
(Germany,Holland)
(Sweden,India)
How can i add the list items to a 2-D array in above manner.
The toArray method returns single dimension array.
Thanks in advance.
ArrayList listArray = new ArrayList();
listArray.add("Germany");
listArray.add("Holland");
listArray.add("Sweden");
listArray.add("India");
Now i want to convert this list or add the above elements of the list to an two-dimensional array as below:
(Germany,Holland)
(Sweden,India)
How can i add the list items to a 2-D array in above manner.
The toArray method returns single dimension array.
Thanks in advance.