I want to parse a file and use 2 ‘new line’ (\n) as a dilimiter instead of EOL and add that into a string object.
Here is the algorithm –
1. While end of file is not reached
2. Read a file until you hit 2 \n's or eof is reached
put that contents as a string to a List object.
3. go to 1.
You can use Scanner.useDelimiter() method.
According to JLS new line is