String s="7979, 333, 222, 9999";
I want to convert the String above to an array:
int[] con = {7979,333,222,999};
and use this array further
Here is my code:
Object[] array = arrayList.toArray();
String sta= (Arrays.toString(array));
String stb= sta.replaceAll("\\[", "").replaceAll("\\]","");
tv.setText(stb);
System.out.println(stb);
int[] numbers = Arrays.asList(numbersArray.split(","))
.stream()
.map(String::trim)
.mapToInt(Integer::parseInt)
.toArray();