Assume the text file contains:
He is a boy .
She is sick .
Ali is playing .
We are eating .
The dog is barking .
He and his brother are running .
How can I put all the sentences into array list in format:
He is
is a
a boy
boy .
She is
is sick
sick .
and so on.
I use array list to avoid keep reading the text file to perform some task is it possible?
Or I need to use vector to do it?
This should make it. I didnt test it. and this is a code just for one line, you`ll need something to Scan your input and consume each line;