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
26 lines
674 B
Plaintext
26 lines
674 B
Plaintext
$ java src/Members.java
|
|
HELLO!
|
|
apple, banana, cherry
|
|
{apple=5, banana=6, cherry=6}
|
|
2.10
|
|
Point[x=3, y=4] is 5.0 from the origin
|
|
calls so far: 1
|
|
|
|
$ java src/WithArgs.java one two
|
|
args.length = 2
|
|
arg: one
|
|
arg: two
|
|
|
|
$ java src/InstanceMainInClass.java
|
|
hello from an instance field
|
|
this class is InstanceMainInClass, final? false
|
|
|
|
$ java src/NeedsImport.java (java.net.http is outside java.base: a normal import fixes it)
|
|
default HTTP version: HTTP_2
|
|
|
|
$ java src/NeedsModuleImport.java (or import the whole module)
|
|
default HTTP version: HTTP_2
|
|
|
|
$ java multi/App.java (App.java + Greeter.java in one directory)
|
|
Hello, multi-file source launcher (from a second file)
|