You do need to remove all of the spaces after you read the file. You can't convert the string "10 " to the int 10.
You checked if the stream had more lines in your OP.
while ((line =...
Type: Posts; User: Brt93yoda
You do need to remove all of the spaces after you read the file. You can't convert the string "10 " to the int 10.
You checked if the stream had more lines in your OP.
while ((line =...
Here's what you need to know.
1) Read a file (DONE)
2) Tokenize a String (DONE)
3) Convert a string to an int
To convert a String to an Int use the following code:
...