Java 27 and 26: runnable demos and captured output for every JEP, plus version lanes

This commit is contained in:
2026-09-21 13:55:46 +00:00
commit eecdf0e444
96 changed files with 3606 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
$ javac --enable-preview --release 26 Lazy26.java (JDK 26)
exit=0
$ javac --enable-preview --release 27 Lazy26.java (JDK 27)
Lazy26.java:12: error: cannot find symbol
if (!GREETING.isInitialized()) {
^
symbol: method isInitialized()
location: variable GREETING of type LazyConstant<String>
Lazy26.java:13: error: cannot find symbol
System.out.println("not yet: " + GREETING.orElse("<unset>"));
^
symbol: method orElse(String)
location: variable GREETING of type LazyConstant<String>
2 errors
exit=1