Comprehensive chapter notes for exam preparation
How a Java program is written, compiled, and run — tokens, main, naming, and the JDK/JRE/JVM split
Arithmetic, comparison, short-circuit logic, bitwise ops, increment, precedence — and the exam traps that become production bugs
if/else, switch (classic and Java 14+ expressions), the ternary, and the conditions professionals write so they stay readable
while, do-while, for, enhanced for, break/continue, and how to write a loop that terminates for the reason you intended
One- and two-dimensional arrays, indexing, copying, java.util.Arrays, and the algorithms every first course expects you to write by hand
System.in/out/err, print vs printf, Scanner token vs line, command-line arguments, and the nextInt/nextLine trap
Immutability, the string pool, builders, encoding, and production pitfalls — from school APIs to job-ready string handling
Method syntax, signatures, pass-by-value, overloading resolution, and API design a working Java engineer uses every day
Block and class scope, public/private/protected, static vs instance, final, this, and initializer blocks
Base case, call stack, recursion vs iteration, why naive Fibonacci is a trap, and when a recursive solution is the professional one
package declarations, directory layout, import vs fully qualified names, java.lang, and access across packages
Classes as types, objects as identity, constructors, encapsulation, and composition — the model professional Java is built on
The Java type system a professional must have in muscle memory — primitives, boxing, identity, defaults, and arrays
The Object contract, value objects vs entities, records, and why mutable keys corrupt maps
Subtyping, Liskov, default methods, sealed types, enums as classes, and when composition wins
Checked vs unchecked, exception translation, try-with-resources, and APIs that fail clearly
Type parameters, wildcards, PECS, erasure, reifiability, and the APIs that stay type-safe after javac
List, Set, Map contracts, iteration, fail-fast, unmodifiable factories, and concurrent collections
Threads vs executors, locks, visibility, happens-before, and CompletableFuture — revision for production Java
Functional interfaces, stream pipelines, Optional rules, and the production mistakes that look elegant
Heap vs stack, GC at revision level, classloaders, classpath vs modules — enough to debug production Java
JUnit, logging, null-safety, API design, and Effective Java rules that show up in reviews
Standard Java library classes and their methods