Outline how a Java program could convert a string such as “1,2,3,4,5” into an array ({1, 2, 3, 4,5})
From zvzdhk:
String[] array = "1,2,3,4,5".split(",");
Then, parse your integers:
int[] ints = new int[array.length]; for(int i=0; i