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
8 lines
214 B
Java
8 lines
214 B
Java
class Base { Base(Runnable r) {} }
|
|
class InnerOuterThis extends Base {
|
|
int x = 3;
|
|
InnerOuterThis() {
|
|
super(() -> IO.println(x)); // lambda capturing this.x inside the super(...) arguments
|
|
}
|
|
}
|