```
import java.util.List;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.StringTokenizer;
public class sourc {
public static void main(String[] args) {
        String name = null;
        Integer id = null;
        String strings = "one*10*two*11*three*12";
        StringTokenizer st2 = new StringTokenizer(strings, "*");
        while (st2.hasMoreElements()) {
            name = st2.nextElement().toString();
            id = Integer.parseInt(st2.nextElement().toString());
            String[] str = new String[]{name};
            List<String> al = new ArrayList<String>(Arrays.asList(str));
            System.out.println(al);
            ArrayList<Integer> arrli = new ArrayList<Integer>(id);
            arrli.add(id);
            System.out.println(arrli);
        }

}

```

i have output like

[one]

[10]

[two]

[11]

[three]

[12]

But i need output like

[one,two,three]

[10,11,12]