Question: How to read a text file of multiple lines into a string array in Java? for instance: text file: line 1 has this data line
How to read a text file of multiple lines into a string array in Java? for instance:
text file:
line 1 has this data
line 2 has this much
line 3 does have a lot of data
how can i read the above into a string array. P.S. we dont necessarily know the number of lines in the text file
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
