How do I go about taking input that is multiple lines, such as
4 2 9
1 4 2
9 8 5
and placing it into an array of that is big enough to hold each line with no empty positions, or an arraylist. I've tried many ways to do this and cannot find a solution. For example, if the user copied and pasted the above snippet as input, I want an array or arraylist to hold
["4 2 9", "1 4 2", "9 8 5"]