Files

14 lines
788 B
Markdown

# java17-features — Java 17 features with examples
Companion code for the ankurm.com article **Java 17 Features with Examples: Records, Sealed Classes, Text Blocks, Switch Expressions**. The explanation lives in the article; this folder holds the runnable sources and the transcripts they produced. There is no `docs/` folder: the depth is inside the article itself.
```bash
JDK11=/path/to/jdk11 JDK17=/path/to/jdk17 ./run.sh # regenerates output/*.txt
```
- `src/` compiles and runs unchanged on the JDK named in each output header.
- `broken/` fails to compile on purpose; the compiler's own message is committed in `output/`.
- `output/` is real captured output, regenerated by `run.sh`.
Tested on: Temurin 17.0.20.1, plus 11.0.32.1 for the strong-encapsulation comparison.