(Updated January 20, 2025) Table of contents Overview Getting Started User-Defined Methods Calling Our Methods void Methods Value-returning Methods Method Overloading Parameters Revisited Quiz Exercises Overview User-defined methods are methods created by the application writer to support a particular feature, to fulfill a specific need that has not already been met through the use of … Read More “Chapter 6 – User Defined Methods” »
Author: William Jojo
(Updated January 19, 2025) Table of contents Overview The while loop Range-based or Counter-based loop Sentinel-based loop Flag-based loop EOF-based loop The for loop The do-while loop The break and continue statements Nested Loops File Handling Quiz Building a Command Line Interface Exercises Overview There is a clear need for repetition in many things during … Read More “Chapter 5 – Iterative Control Structures and Files” »
(Updated February 10, 2025) Table of contents Relational Operators One-way and two-way selection Compound Statements Multi-way selection The Dangling else Logical Operators Comparing Strings The switch Statement Short-circuit Evaluation The ternary operator ?: Quiz Exercises Relational Operators Up to this point, our statements have been executing sequentially; they have been processed in order without any … Read More “Chapter 4 – Conditional Control Structures” »
(Updated January 7, 2025) Table of contents Objects Packages of Predefined Classes and Methods Random Numbers – Math.Random() (OPTIONAL) Random Numbers – Random Class (OPTIONAL) Random Numbers – ThreadLocalRandom Class String – Revisited VIDEO – Strings Output with the printf() method Wrapper Classes GUI-based I/O VIDEO – Basic GUI with JOptionPane Converting println to printf … Read More “Chapter 3 – Objects, Input and Output” »
(Updated January 5, 2025) Table of contents Overview Components of the Language Data Types Arithmetic Operators and Precedence String Class Named Constants and Variables VIDEO – Basic Java Program Basic Input/Output Escape Increment, Decrement, Concatenation and Comments The Dot Operator VIDEO – Java Program Demonstrating Basic I/O Quiz Exercises Overview This is an extensive chapter. … Read More “Chapter 2 – Elements of the Java Language” »
This textbook follows a few basic teaching paradigms, which are as follows: Constructivism – the premise that learning occurs through the physical building (construction) of solutions. Therefore, this is a project-based approach. Throughout this textbook, there are two primary subplots. During what would be considered the first semester of study (Chapters 1 to 7), learners … Read More “Introduction” »
August 2021 When I first began teaching, I knew nothing about how people learn, save one person – myself. The way I learned was nearly never the same as how others learned. So, after a couple of decades of honing my craft, I decided it was high time I invested in myself. My masters work … Read More “Acknowledgements” »
(Updated January 5, 2025) Table of Contents About the Second Edition A Brief History of Java Translating the Language An Example A Word on Programming Methodologies A Proposed Template Quiz Exercises About the Second Edition This textbook has undergone a significant renovation in 2024. A button for nearly every complete program now allows you to … Read More “Chapter 1 – The Java Environment” »
This textbook follows a few basic teaching paradigms, which are as follows: Constructivism – the premise that learning occurs through the physical building (construction) of solutions. Therefore, this is a project-based approach. Throughout this textbook, there are two primary subplots. During what would be considered the first semester of study (Chapters 1 to 9), learners … Read More “Introduction” »
October 2023 When I first began teaching, I knew nothing about how people learn, save one person – myself. The way I learned was nearly never the same as how others learned. So, after a couple of decades of honing my craft, I decided it was high time I invested in myself. My masters work … Read More “Acknowledgements” »