You can use JBang to run the examples right from GitHub, for eexample:
jbang https://github.com/flowlogix/blogs/blob/main/TransientFinalExample.java
jbang edit https://github.com/flowlogix/blogs/blob/main/TransientFinalExample.java
jbang https://github.com/flowlogix/blogs/blob/main/TransientFinalExample.java