Part II, Chapters 26–36 (pp. 381–494) of Computer Science I.
Chapters
| Ch | Title | Page |
|---|---|---|
| 26 | Basics (Hello World, main() method, program structure, I/O) | 383 |
| 27 | Conditionals (comparing strings/chars) | 403 |
| 28 | Loops (enhanced for) | 415 |
| 29 | Methods (void methods, passing by reference) | 423 |
| 30 | Error Handling & Exceptions (catching, throwing, custom, checked; enums) | 431 |
| 31 | Arrays (dynamic memory, multidimensional, dynamic data structures) | 439 |
| 32 | Strings (methods, arrays of strings, comparisons, tokenizing) | 449 |
| 33 | File I/O | 457 |
| 34 | Objects (data visibility, accessors/mutators, constructors, composition) | 461 |
| 35 | Recursion | 479 |
| 36 | Searching & Sorting (Comparators, sorted collections, equals()/hashCode(), Java 8 lambdas) | 483 |
What Java Exposes
- Full OOP: data visibility, accessors/mutators, constructors, composition (encapsulation & objects).
- Exceptions: checked vs unchecked, custom exceptions (error handling).
equals()vs==andhashCode()contract (strings, searching & sorting).- Java 8 lambda expressions as first-class behavior — modern take on functions as entities.
nullhandling in sorted collections.
Typical target: Computer Science majors’ CS1.
Citations
[1] Computer Science I, Part II, pp. 381–494.