I am writing an android app for which I want to write a function that parses a text file collecting all the lines and putting it into single String object and display the contents as it was in the file.
The display should be along with all the ‘new line’ characters which is present in the text file.
How can I do this?
Also like an end of file, Is there a way to use another identifier within a file so that I can have multiple portions within the same file ?
Thanks in advance
You can store what you parse from the text file in a single String that’s no problem.
You can also use different Strings for each line of text but it’ll be pretty much resource consuming and unnecessary.
To put it short yes you can use one String for your question.