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
7 lines
227 B
Java
7 lines
227 B
Java
class Parent { Parent(int x) {} }
|
|
class SuperInBranch extends Parent {
|
|
SuperInBranch(boolean big) {
|
|
if (big) super(100); else super(1); // super(...) must appear once, at top level of the constructor body
|
|
}
|
|
}
|