My arraylist consists of an array with a list of strings, each string inside is separated by commas, i want to split one of the strings into substrings divided by the commas, i know how to do it to arrays by using the split method, but im having trouble finding something similar to array lists, heres the code:
String[] widgets2 =
{
"1,John,Smith,[email protected],20,88,79,59",
"2,Suzan,Erickson,Erickson_1990@gmailcom,19,91,72,85",
"3,Jack,Napoli,The_lawyer99yahoo.com,19,85,84,87",
"4,Erin,Black,[email protected],22,91,98,82",
"5,Adan,Ramirez,[email protected],100,100,100"
};
ArrayList<String> jim = new ArrayList<String>(Arrays.asList(widgets2));
System.out.println(jim.split(0));
jim.get(index).split()probably? How did you do it in arrays?jim.get(0).split(",")may be?