From 7d90433a9a5573499afecc18ba95f2f47620649b Mon Sep 17 00:00:00 2001 From: Isaac Shoebottom Date: Wed, 7 Feb 2024 09:45:59 -0400 Subject: [PATCH] Add example on how to use java for scripting --- JavaScripts/HelloWorld | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 JavaScripts/HelloWorld diff --git a/JavaScripts/HelloWorld b/JavaScripts/HelloWorld new file mode 100755 index 0000000..e85e43a --- /dev/null +++ b/JavaScripts/HelloWorld @@ -0,0 +1,10 @@ +#!/bin/env -S java --source 11 + +class Main { + public static void main(String args[]) { + System.out.println("HelloWorld!"); + + // Print the sum of 1 and 2 + System.out.println(1 + 2); + } +}