I am loading a String from a csv file and trying to make an int array with it. The problem is I keep running into a NumberFormatException which is thrown when the program finds a "" in the String array.
I don't need those empty Strings, I just want ints.
Is there a way to avoid replacing characters with empty Strings?
aLine = aLine.replaceAll(" ", "").replaceFirst(",", "");
aLine = aLine.replace(name, "").replaceAll("\"", "");
final String[] strScores = aLine.split(",");
final int[] scores = Arrays.stream(strScores)
.mapToInt(Integer::parseInt).toArray();