No problem. If you use a List instead of an array, you might be able to "get around" that problem by only adding valid numbers. But I'm not sure of your actual requirements, so it's up to you.
Type: Posts; User: KevinWorkman
No problem. If you use a List instead of an array, you might be able to "get around" that problem by only adding valid numbers. But I'm not sure of your actual requirements, so it's up to you.
Please understand what you're doing at each step.
Try playing with what is returned by row.split(" "). What type is it? What does it look like? Can you iterate over it? What is in each index?
...
You already have the needed code. You already split the rows (which returns an array), and you already convert that array into a List.
The only thing you have to do is, instead of simply printing...
You already have the code that stores your data into a data structure.
Instead of printing out the List returned from Arrays.asList(), store it to a variable. Try printing out its size, iterating...