Skip to content
Advertisement

Tag: java-9

Error:java: invalid flag: -release

I use Java : and IntelliJ IDEA: Get error when compiling: Executing javac -help : So javac should use two hyphens with release, but Intellij Idea use with one. Can I override javac options that IDEA use or fix it in some way? UPD: Even Build, Execution, Deployment > Compiler > Java Compiler Additional Command Line Parameter doesn’t help in

List.of() or Collections.emptyList()

As an special case of List.of(…) or Collections.unmodifiableList() – what is the preferred Java 9 way of pointing to an empty and immutable list? Keep writing or switch to Answer What is the preferred Java 9 way of pointing to an empty and immutable list? The difference is rather subtle so “preferred” depends on what you want to achieve. Some

Advertisement