The repository contains solutions and examples for the exercises from the book described below.
If you want to run the project locally, it can be done easily because it was developed on Docker.
Create, Compile, and Run Java Programs Today
Herbert Schildt
Oracle Press
- Unix-based OS
- Git
- Docker
Run the commands one by one:
git clone https://github.com/pavel-rossinsky/java-a-beginners-guide-herbert-schildt.git
cd java-a-beginners-guide-herbert-schildt
mkdir jvm-sources .m2
cp ./docker/builds/jdk/etc/env-example .env
# Open the .env file and set the right path to the project on your OS
# for example /users/you_user_name/Documents/repository/java-a-beginners-guide-herbert-schildt
docker-compose build
Find a class that is of your interest and copy its fully-qualified name, then run:
docker-compose run jdk mvn compile exec:java -Dexec.mainClass={fully_qualified_class_name}
For instance:
docker-compose run jdk mvn compile exec:java -Dexec.mainClass=com.guide.c1.GalToLitTable
docker-compose run jdk mvn compile exec:java -Dexec.mainClass=com.guide.c2.SelfTest10
or with arguments:
docker-compose run jdk mvn compile exec:java -Dexec.mainClass=com.guide.c5.CLDemo -Dexec.args="one two three"
docker-compose down -v
# | Chapter | Status |
---|---|---|
1 | Java Fundamentals | ☑️ |
2 | Introducing Data Types and Operators | ☑️ |
3 | Program Control Statements | ☑️ |
4 | Introducing Classes, Objects, and Methods | ☑️ |
5 | More Data Types and Operators | ☑️ |
6 | A Closer Look at Methods and Classes | ☑️ |
7 | Inheritance | ☑️ |
8 | Packages and Interfaces | ☑️ |
9 | Exception Handling | ☑️ |
10 | Using I/O | ⏳ |
11 | Multithreaded Programming | ☕ |
12 | Enumerations, Autoboxing, Static Import, and Annotations | ☕ |
13 | Generics | ☕ |
14 | Lambda Expressions and Method References | ☕ |
15 | Modules | ☕ |
16 | Introducing Swing | ☕ |
17 | Introducing JavaFX | ☕ |
D | Introducing JShell | ☕ |