Last Updated: November 21, 2025
Basic Syntax
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello World");
}
}
Data Types
| Item | Description |
|---|---|
int
|
Integer numbers |
double
|
Decimal numbers |
String
|
Text |
boolean
|
true/false |
💡 Pro Tip:
Use try-with-resources for automatic resource management!