System.lineSeparator() not available when I am developing Android. I had to use an older version of System.getProperty("line.separator") .
System.lineSeparator()
System.getProperty("line.separator")
Can someone explain to me why this is? Is this because the Android SDK does not use Java 7?
Yes, System.lineSeparator() is a JAVA 1.7 function. System.getProperty("line.separator") is the right way to do this before 1.7
There is an open error on the oracle site where System.lineSeparator() not marked with @Since 1.7. http://bugs.sun.com/view_bug.do?bug_id=7094275
"The new static lineSeparator () method in the java.lang.System class is new in java 1.7, so it should have the @since 1.7 annotation present in javadoc."
Source: https://habr.com/ru/post/955158/More articles:ViewDidLoad is slow when you click the viewcontroller - iphoneWhy is the dagger not interrupted at compile time when the class in the injection sentence cannot be entered? - javapipe seq to printf for formatting numbers - bashJackson: generate schemas with links - javaiOS 7 UINavigationBar is above content when using auto-layout - iosUsing FLT_EPSILON for a 64-bit iPhone 5S - objective-cSublime Text 2 / sublimeLinter: only Python is a real-time background - sublimetext2What does this Javascript (regular expression) operator mean? - javascriptRouting in Zend Framework 2 - phpHow to use gexiv2 in python? - pythonAll Articles