Skip to main content
added 11 characters in body
Source Link
Basil Bourque
  • 346.2k
  • 128
  • 949
  • 1.3k

In Java 9:

Map.of in Java 9+

private static final Map<Integer, String> MY_MAP = Map.of(1, "one", 2, "two");

See JEP 269 for details. JDK 9 reached general availability in September 2017.

In Java 9:

private static final Map<Integer, String> MY_MAP = Map.of(1, "one", 2, "two");

See JEP 269 for details. JDK 9 reached general availability in September 2017.

Map.of in Java 9+

private static final Map<Integer, String> MY_MAP = Map.of(1, "one", 2, "two");

See JEP 269 for details. JDK 9 reached general availability in September 2017.

Java 9 general availability
Source Link
Jonik
  • 82k
  • 77
  • 272
  • 385

In Java 9:

private static final Map<Integer, String> MY_MAP = Map.of(1, "one", 2, "two");

See JEP 269 for details. Java 9 general availability is set to July 2017. Download JDK 9 early access buildsreached heregeneral availability in September 2017.

In Java 9:

private static final Map<Integer, String> MY_MAP = Map.of(1, "one", 2, "two");

See JEP 269 for details. Java 9 general availability is set to July 2017. Download JDK 9 early access builds here.

In Java 9:

private static final Map<Integer, String> MY_MAP = Map.of(1, "one", 2, "two");

See JEP 269 for details. JDK 9 reached general availability in September 2017.

Java 9 postponed to July 2017
Source Link
Jonik
  • 82k
  • 77
  • 272
  • 385

In Java 9:

private static final Map<Integer, String> MY_MAP = Map.of(1, "one", 2, "two");

See JEP 269 for details. Java 9 general availability is set to MarchJuly 2017. Download JDK 9 early access builds here.

In Java 9:

private static final Map<Integer, String> MY_MAP = Map.of(1, "one", 2, "two");

See JEP 269 for details. Java 9 general availability is set to March 2017. Download JDK 9 early access builds here.

In Java 9:

private static final Map<Integer, String> MY_MAP = Map.of(1, "one", 2, "two");

See JEP 269 for details. Java 9 general availability is set to July 2017. Download JDK 9 early access builds here.

Adhere to constant naming convention; mention Java 9 release date
Source Link
Jonik
  • 82k
  • 77
  • 272
  • 385
Loading
Source Link
Tagir Valeev
  • 100.9k
  • 19
  • 233
  • 346
Loading