BufferedReader reader = new BufferedReader(new FileReader(strPath));
String line;
while ((line = reader.readLine()) != null)
{
out.println(line);
}
My textfile is like:
Statement1
Statement2
Statement3
the output i get is:
Statement1Statement2Statment3
I need the output as it is..same as the text file...i have tried to identify the newline charc as \n or \r or \n\r and then compare it.
if(line.equals("\n")
out.println("\n")
ALSO tried
if(line.equals("")
out.println("\n")
Nothing seems to work...Please need help...i have tried using the read() for charac by charac and still i am not getting it :( :(