function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
kannapapikannapapi 

one dimaensional string array to multi-dimensional array in apex

Hi,
i am having 1*1 dimensional array like this
{1,2,3,4
5,6,7,8
9,10,11,12}
i need multi dimensional array(4* 4 matrix) by spliiting (,) like this:
{1 2 3 4
 5 6 7 8 
9 10 11 12}
Any help appreciated..
Balaji BondarBalaji Bondar
Hi kannapapi,

You can use List of Lists.
List<List<Integer>> LeadList = new List<List<Integer>>();
Important :
If this is what you were looking for then please mark it as a "SOLUTION" or You can Click on the "Like" Button if this was beneficial for you.