I am trying to split a String
by .
:
String sentences[] = fileContent.split(".");
fileContent
is a string that contains the complete text data from a file. In the file there are 4 sentences some separated by white space gaps.
When I print sentences[n]
it gives a blank
. Why is it so when sentences.length
prints 95.
Data structured in fileContent
looks like : (no-meaning text)
My name is suhail. His name is suhail.
He was playing with suhail. He is cool and loves suhail.