Java playground
public class Main { public static void greet(String name) { String msg = String.format("Hello, %s!", name); System.out.println(msg); } public static void main(String[] args) { greet("World"); } }
Java is a class-based, object-oriented programming language famous for its "write once, run anywhere" multi-platform approach.
⛫ homepage • αω tutorial • ⚘ community
Sandbox details
Java version: 21
sandbox engine: codapi
sandbox name: java
allowed commands: run
in-browser: ✘
Usage example:
```java
public class Main {
public static void main(String[] args) {
System.out.println("Hello, World!");
}
}
```
<codapi-snippet sandbox="java" editor="basic">
</codapi-snippet>