Converting String Array to an Integer Array
问题 so basically user enters a sequence from an scanner input. 12, 3, 4 , etc. It can be of any length long and it has to be integers. I want to convert the string input to an integer array. so int[0] would be 12 , int[1] would be 3 , etc. Any tips and ideas? I was thinking of implementing if charat(i) == ',' get the previous number(s) and parse them together and apply it to the current available slot in the array. But I'm not quite sure how to code that. 回答1: You could read the entire input line