JShell

Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

Install the latest PowerShell for new features and improvements! https://aka.ms/PSWindows

PS C:\WINDOWS\system32> java -version
openjdk version "21.0.5" 2024-10-15
OpenJDK Runtime Environment OpenLogic-OpenJDK (build 21.0.5+11-adhoc.Administrator.jdk21u)
OpenJDK 64-Bit Server VM OpenLogic-OpenJDK (build 21.0.5+11-adhoc.Administrator.jdk21u, mixed mode, sharing)
PS C:\WINDOWS\system32>
PS C:\WINDOWS\system32>
PS C:\WINDOWS\system32> jshell
| Welcome to JShell -- Version 21.0.5
| For an introduction type: /help intro

jshell> System.out.prin
print( printf( println(
jshell> System.out.println("Hello World");
Hello World

jshell>

IntelliJ 

public class Main {
public static void main(String[] args) {
System.out.println("Hello World"); } }
"C:\Program Files\OpenLogic\jdk-21.0.5.11-hotspot\bin\java.exe" "-javaagent:D:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2024.2.4\lib\idea_rt.jar=50954:D:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2024.2.4\bin" -Dfile.encoding=UTF-8 -Dsun.stdout.encoding=UTF-8 -Dsun.stderr.encoding=UTF-8 -classpath "C:\Users\Win10x64i7\IdeaProjects\Hello World\out\production\Hello World" Main
Hello World