windows下的文本文件换行符:\r\n linux/unix下的文本文件换行符:\r Mac下的文本文件换行符:\n 直接使用System.getProperty("line.separator");即可根据不同操作系统进行换行