Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ic4b6ZEVHGaYy15HAxRzy
16 lines
549 B
Java
16 lines
549 B
Java
///usr/bin/env jbang "$0" "$@" ; exit $?
|
|
//JAVA 25+
|
|
|
|
/**
|
|
* The classic shape: one file, one class, a static main.
|
|
* The first line is a shebang trick so ./Hello.java works on Linux/macOS once chmod +x.
|
|
*/
|
|
public class Hello {
|
|
public static void main(String[] args) {
|
|
String who = args.length > 0 ? String.join(" ", args) : "world";
|
|
System.out.println("Hello, " + who + "!");
|
|
System.out.println("Running on Java " + Runtime.version().feature()
|
|
+ " (" + System.getProperty("java.vendor") + ")");
|
|
}
|
|
}
|