java-guide
A guide to modern Java (Java 17)
Content
- genesis.md
- basic_types.md
- methods.md
- jshell_vs_java.md
- numbers.md
- control_flow.md
- interface.md
- lambda.md
- list_and_map.md
- string_formatting.md
- encapsulation.md
- equals_hashCode_toString.md
- contract.md
- modifable_vs_mutalble.md
- null_and_optional.md
- inheritance.md
- exception.md
- enum.md
- internal_classes.md
- implementing_interface.md
- generics.md
- wrapper.md
- variance.md
- limitation_of_generics.md
- stream.md
- collector.md
- data_structure.md
- sort.md
Using Java Shell (jshell)
Each chapter comes with executable examples that you can run using jshell.
To get the examples, just clone this repository
git clone http://github.com/forax/java-guide
Then run jshell (at least Java 14 version)
jshell --enable-preview
Then you can copy paste the examples inside jshell and see by yourself.
To quit use '/exit', to enable verbose error messages '/set feedback verbose', otherwise to get the help type '/help'
Work in progress
This is a work in progress, don't hesitate to contribute, i'm waiting your pull request
Build markdown files from jshell files
Using java 14
java --enable-preview build/build.java