I’m reading in a text file formated like
word
definiton
word
definition
definition
word
definition
So I need to keep try of whether I’m in a definition or not based on when I reach those emtpy lines. Thing is, BufferedReader discards \n characters, and somehow comparing that empty line to String "" is not registering like I thought it would. How can I go about doing this.
"".equals(myString)(which isnull-safe) notmyString == "".myString.isEmpty()(notnull-safe)myString.trim()to get rid of extra whitespace before the above checkHere’s some code: