I want to read and split each line into a String array, each line having different number of blank characters between each element.
How can I use ” ” (space) as an argument to split to split the line into array elements?
Here is a sample of what kind of file I want to process:
1 Build-walls 4 2 5 0
2 Build-roofs 6 4 0
Use simple regular expression:
"\\s+"means “at least one white space“.