New line character / OS dependence

The new line character depends on your OS \n for Unix, \r\n for Windows and \r for old Macs

Always use

System.getProperty("line.separator")

To find out OS specific line separator instead of judging yourself and hard coding it.

This error can lead to many bugs in system

No comments:

Post a Comment

Please share your views and comments below.

Thank You.