How do I get a platform-dependent new line character?

前端 未结 9 1306
予麋鹿
予麋鹿 2020-11-22 02:17

How do I get a platform-dependent newline in Java? I can’t use \"\\n\" everywhere.

9条回答
  •  灰色年华
    2020-11-22 02:45

    The commons-lang library has a constant field available called SystemUtils.LINE_SEPARATOR

提交回复
热议问题