GNGiseldo Neo and Alana NeoBooks
Introduction to Programming in Java1 / 25

Overview

Welcome!

This book teaches Java programming through the progressive construction of a console chatbot. Each chapter introduces a concept, applies it in a small increment of the project, and concludes with a verifiable hands-on practice.

Learning path: from fundamentals to TutorJavaBot.

Figure 1. Learning path: from fundamentals to TutorJavaBot.

Who This Book Is For

The material is designed for students who are just starting out in programming. No prior knowledge of Java, object-oriented programming, or development tools is required. You only need to know how to create files and run basic terminal commands.

Adopted Environment

Edition 0.2 — revision of August 29, 2026.

The examples target Java 21 or later and rely solely on the standard library (except for optional SQLite JDBC integration in Part III). The complete, compilable source code is available in the examples/src folder, while the chapters present smaller snippets to highlight each concept.

How to Study

In each chapter:

  1. read the learning objectives and try to predict how the examples behave;
  2. run the complete example before modifying it;
  3. implement the proposed increment for the chatbot;
  4. verify the result using the listed test cases;
  5. consult the answers appendix only after attempting the activity yourself.

The project begins with fixed messages, adds user input, conditionals, loops, methods, and collections, and is later refactored with classes, encapsulation, composition, inheritance, interfaces, and polymorphism.

Organization

  • Part I — Fundamentals Applied to the Chatbot: syntax, types, input, conditionals, loops, methods, arrays, collections, classes, and error handling.
  • Part II — Object-Oriented Programming and Project Evolution: design, encapsulation, composition, inheritance, interfaces, generics, testing, and refactoring.
  • Part III — Chatbots and Natural Language Processing: introduction to chatbots, ELIZA, text processing with regular expressions, intents and entities, stateful chatbots, database integration, and an advanced chatbot project.
  • Appendices: commented answers, information about the authors, and legal notice.

By the end, you will have built TutorJavaBot, a console application with commands, conversation history, file persistence, and a clean architecture ready for new features, in addition to exploring advanced chatbot and NLP concepts.

Book Statistics

To view the complete book statistics, see BOOK_STATISTICS.md.

The complete book includes:

  • 25 source chapters (including preface/index and appendices)
  • 3 progressive parts covering fundamentals, OOP, and NLP chatbots
  • 40 compilable Java example files across examples/src/ and examples/src/part3/

Happy studying!

Giseldo Neo and Alana Neo