Skip to content

pavel-rossinsky/java-a-beginners-guide-herbert-schildt

Repository files navigation

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

Java - A Beginner's Guide Herbert Schildt

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 ☑️
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

Releases

No releases published

Packages

No packages published

Languages