Files

11 lines
340 B
Java

//JAVA 25+
// A compact source file (JEP 512, final in Java 25): no class, no "public static",
// no String[] args. The compiler wraps this in an implicit class named after the file.
String greeting = "Hello from a compact source file";
void main() {
IO.println(greeting);
IO.println("Implicit class: " + getClass().getName());
}