java-a-beginners-guide-herbert-schildt
java-a-beginners-guide-herbert-schildt copied to clipboard
Solutions to the exercises of the book "Java - A Beginner's Guide" seventh edition by Herbert Schildt
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.
Java - A Beginner's Guide
Seventh Edition
Create, Compile, and Run Java Programs Today
Herbert Schildt
Oracle Press
Technical prerequisites
- Unix-based OS
- Git
- Docker
Getting started
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
How to compile and run a class
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"
How to uninstall the project
docker-compose down -v
Contents
# | Chapter | Status |
---|---|---|
1 | Java Fundamentals | :ballot_box_with_check: |
2 | Introducing Data Types and Operators | :ballot_box_with_check: |
3 | Program Control Statements | :ballot_box_with_check: |
4 | Introducing Classes, Objects, and Methods | :ballot_box_with_check: |
5 | More Data Types and Operators | :ballot_box_with_check: |
6 | A Closer Look at Methods and Classes | :ballot_box_with_check: |
7 | Inheritance | :ballot_box_with_check: |
8 | Packages and Interfaces | :ballot_box_with_check: |
9 | Exception Handling | :ballot_box_with_check: |
10 | Using I/O | :hourglass_flowing_sand: |
11 | Multithreaded Programming | :coffee: |
12 | Enumerations, Autoboxing, Static Import, and Annotations | :coffee: |
13 | Generics | :coffee: |
14 | Lambda Expressions and Method References | :coffee: |
15 | Modules | :coffee: |
16 | Introducing Swing | :coffee: |
17 | Introducing JavaFX | :coffee: |
D | Introducing JShell | :coffee: |