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
23 lines
491 B
Plaintext
23 lines
491 B
Plaintext
$ javac -d out src/Hello.java && java -cp out Hello
|
|
Hello, world
|
|
|
|
$ javap -p -cp out Hello
|
|
Compiled from "Hello.java"
|
|
final class Hello {
|
|
Hello();
|
|
void main();
|
|
}
|
|
|
|
$ javap -v -cp out Hello | grep -E 'major|flags'
|
|
major version: 69
|
|
flags: (0x0030) ACC_FINAL, ACC_SUPER
|
|
|
|
$ java Reflect (asks the loaded class)
|
|
name : Hello
|
|
final : true
|
|
public : false
|
|
package : '' (unnamed)
|
|
superclass : java.lang.Object
|
|
declared : [void Hello.main()]
|
|
constructors: [Hello()]
|