> For the complete documentation index, see [llms.txt](https://jorgectf.gitbook.io/awae-oswe-preparation-resources/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://jorgectf.gitbook.io/awae-oswe-preparation-resources/by-language/java/compiling-and-running.md).

# Compiling & Running

## Hello World example

`HelloWorld.java` (Filename must match class' name)

```java
public class HelloWorld {

    public static void main(String[] args) {
        System.out.println("Hello, World.");
    }

}
```

### Compiling

```bash
javac HelloWorld.java
```

### Executing

```bash
java HelloWorld
```
