System.getProperty [1]

  • 指定のシステム・プロパティを取得する
System.out.println(System.getProperty("user.dir"));
  • システムの改行コードを利用する
final String BR = System.getProperty("line.separator");
System.out.println("This is a pen." + BR + "This is an apple.");