Runnable sources, broken examples and captured transcripts for the ankurm.com JEP 512 article, including the measured launch order and a private-constructor difference between 25 and 27. Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01TF9JWFvJSNm6HVzswzZU5a
9 lines
424 B
Plaintext
9 lines
424 B
Plaintext
$ java broken/PrivateCtor.java (OpenJDK Runtime Environment Temurin-25.0.4.1+1 (build 25.0.4.1+1-LTS))
|
|
instance main() reached through a PRIVATE zero-argument constructor
|
|
|
|
$ java broken/PrivateCtor.java (OpenJDK Runtime Environment Temurin-27+35 (build 27+35))
|
|
error: no non-private zero argument constructor found in class PrivateCtor
|
|
remove private from existing constructor or define as:
|
|
public PrivateCtor()
|
|
|