I am using this piece of code to write some Strings in a Text File , but on using the newLine() , it is adding some INVALID Charatcters
nation[#]patry[#^]like
It is not appending the text to the next line , and in the same line replacing the next line with some unknown charaters.
I am appending the values in stringBuffer with a next line("\n") after each string.
THIS SCENARIO IS COIMING IN FEW SYSTEMS. IN SOME SYSTEM IT IS WORKING FINE BUT IN SOME IT IS RASING
The end of line character is platform-specific. '\n' (0x0A) is the end-of-line character for Unix systems. Windows systems use "\r\n" (0x0D 0x0A). Java methods like BufferedWriter.newLine() and System.getProperty("line.separator") are provided to utilize or obtain the current system's end-of-line character.