I have a String array of numbers that I read in from a data file using a Scanner:
6 10 13 14 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185
I take a line from the file and convert it into a String array. Is there a simple way to convert the String array into an int array without a for loop?
String indices = input.nextLine();
String[] clean = indices.split("\\s+");