aboutsummaryrefslogtreecommitdiffstats
path: root/tests/features1921/java21/NamedClassWithSimpleMainMethodPreview1.java
diff options
context:
space:
mode:
Diffstat (limited to 'tests/features1921/java21/NamedClassWithSimpleMainMethodPreview1.java')
-rw-r--r--tests/features1921/java21/NamedClassWithSimpleMainMethodPreview1.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/features1921/java21/NamedClassWithSimpleMainMethodPreview1.java b/tests/features1921/java21/NamedClassWithSimpleMainMethodPreview1.java
new file mode 100644
index 000000000..d6fced008
--- /dev/null
+++ b/tests/features1921/java21/NamedClassWithSimpleMainMethodPreview1.java
@@ -0,0 +1,11 @@
+/**
+ * Example according to <a href="https://openjdk.org/jeps/445">JEP 445</a>
+ * <p>
+ * This actually does not require any compiler changes and should be compilable without {@code --enable-preview}.
+ * It merely serves as a test case for the JVM launcher protocol.
+ */
+public class NamedClassWithSimpleMainMethodPreview1 {
+ void main() {
+ System.out.println("Hello world!");
+ }
+}