Runnable sources, broken examples and captured transcripts for the ankurm.com JEP 513 article, including the JDK 25 vs 27 compiler wording differences. Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01TF9JWFvJSNm6HVzswzZU5a
12 lines
505 B
Plaintext
12 lines
505 B
Plaintext
$ javac broken/OnJdk21.java && java OnJdk21 (OpenJDK Runtime Environment (build 21.0.10+7-Ubuntu-124.04))
|
|
broken/OnJdk21.java:7: error: call to super must be first statement in constructor
|
|
super(name.strip());
|
|
^
|
|
1 error
|
|
|
|
$ javac broken/OnJdk21.java && java OnJdk21 (OpenJDK Runtime Environment Temurin-25.0.4.1+1 (build 25.0.4.1+1-LTS))
|
|
constructed
|
|
|
|
$ javac broken/OnJdk21.java && java OnJdk21 (OpenJDK Runtime Environment Temurin-27+35 (build 27+35))
|
|
constructed
|