How in28minutes/javainterviewquestionsandanswers works
1. This repository is not a product application; it is a Maven-based Java learning playground for interview prep. Its architecture is organized around topic-based example programs, with documentation mirroring the source tree almost one-for-one.
2. The top-level docs/ directory contains the conceptual material: one markdown file per Java topic such as arrays, collections, exceptions, threads, serialization, and OOP. These docs are the primary “specification” for the code examples rather than generated API docs.
3. The executable code lives under src/main/java/com/in28minutes/java/, and the package structure is the main architectural boundary. Each subpackage maps to a Java language area: arrays, basics, flow, operators, variables, string, wrapper, generics, collections, threads, files, serialization, exceptionhandling, enums, innerclass, initializers, object, others, and oops.
4. Most classes are standalone demonstrations, not collaborating services. The dominant data flow is “main method or test method -> example class -> console output,” with no long-lived state, persistence layer, network boundary, or service orchestration.
5. The oops/ subtree is the most internally structured part of the repo. It groups subtopics such as encapsulation, inheritance, polymorphism, interfaces, coupling, and cohesion, and includes small model hierarchies like Animal/Cat/Dog and Actor/Comedian/Hero to show subtype behavior and reuse.
6. Several packages are explicitly about Java language rules rather than business logic. Examples include class/member modifiers, constructors, abstract/final classes, access control across same/different packages, and overloaded/overridden methods. These packages are useful to diagram as “language feature demonstrations” rather than application modules.
7. Collections and concurrency are another major subsystem cluster. collections/ includes hierarchy, fail-fast/fail-safe, and concurrent collection examples; threads/ covers raw threads, synchronization, deadlock, wait/notify, thread priority, and ExecutorService. These examples illustrate concurrency primitives and collection iteration behavior, but they do not compose into a larger runtime pipeline.
8. files/, serialization/, and others/date show interaction with the Java platform APIs. The file examples and serialization examples represent the only areas with real I/O boundaries, but they remain self-contained demonstrations rather than part of a shared storage abstraction.
9. object/ and basics/ contain foundational object-model examples such as equals, hashCode, toString, constructors, and simple domain classes like Actor and Cricketer. These classes are reused only within small lesson-level examples, not across the whole repo.
10. src/test/java contains a small number of tests/examples such as LambdaExpressionsTest and StringVsStringBuffer. These tests are closer to executable learning checks than a conventional automated test suite for a production system.
11. The project uses Maven (pom.xml) as the build and dependency boundary, with standard Java source/test layout. No external application frameworks, databases, queues, or web containers materially shape the architecture.
12. The runtime model is therefore “many independent sample programs” rather than “one composed application.” When drawing the architecture, the clearest representation is a topic-centered content system: docs and code examples aligned by concept, with console I/O as the primary execution path and minimal coupling between packages.
Main entry points: java Java examples · docs Topics · oops OOP · object Object model
Components 19
Docs
Concept notes that mirror the source topics and serve as the learning spec.
- Topics · Primary conceptual entry point for the lesson set.
docs - OOP · Encapsulation, inheritance, polymorphism, interfaces, cohesion, coupling.
docs/oops-advanced.md - Collections · Collection hierarchy, iteration behavior, and concurrency variants.
docs/collections.md - Threads · Synchronization, wait/notify, deadlock, and executors.
docs/threads-and-synchronization.md - File I/O · Console and file interaction examples.
docs/file-io.md - Object methods · equals, hashCode, toString, and constructor-centered examples.
docs/object-methods.md
Main code
Topic-based Java examples under src/main/java.
- Java examples · Main source tree containing independent topic examples.
src/main/java/com/in28minutes/java - Basics · Simple domain objects and introductory examples.
src/main/java/com/in28minutes/java/basics - Language rules · Class/member modifiers and related Java language rule examples.
src/main/java/com/in28minutes/java/classmodifiers - Control flow · Branching, looping, operators, variables, and varargs examples.
src/main/java/com/in28minutes/java/flow - Core types · Strings, wrappers, generics, enums, and initialization examples.
src/main/java/com/in28minutes/java/string - Collections · Hierarchy, fail-fast/fail-safe behavior, and concurrent collections.
src/main/java/com/in28minutes/java/collections - Threads · Raw threads, synchronization, deadlock, wait/notify, and executors.
src/main/java/com/in28minutes/java/threads - I/O · Console, file, and serialization examples.
src/main/java/com/in28minutes/java/files - OOP · Structured object-oriented lessons with subpackages for design principles and inheritance.
src/main/java/com/in28minutes/java/oops - Object model · equals/hashCode, toString, and constructor-centric object examples.
src/main/java/com/in28minutes/java/object - Platform APIs · Date, assertions, garbage collection, and regex examples.
src/main/java/com/in28minutes/java/others
Tests
Small executable learning checks under src/test/java.
- Learning checks · Small executable test-like examples rather than a full verification suite.
src/test/java
Build
Maven project boundary and dependency management.
- Maven · Project build and dependency boundary.
pom.xml
Connections 24
- Maven → Java examples: builds · Maven compiles and runs the example sources.
- Topics → OOP: includes · Documentation is organized by Java topic.
- Topics → Collections: includes · Documentation is organized by Java topic.
- Topics → Threads: includes · Documentation is organized by Java topic.
- Topics → File I/O: includes · Documentation is organized by Java topic.
- Topics → Object methods: includes · Documentation is organized by Java topic.
- Topics → Java examples: specifies · Docs mirror and explain the source tree.
- Java examples → Basics: contains · Foundational lesson examples.
- Java examples → Language rules: contains · Language rule demonstrations.
- Java examples → Control flow: contains · Control-flow and syntax demonstrations.
- Java examples → Core types: contains · Core type and language feature examples.
- Java examples → Collections: contains · Collections-focused examples.
- Java examples → Threads: contains · Threading and synchronization examples.
- Java examples → I/O: contains · I/O and serialization examples.
- Java examples → OOP: contains · Most structured OOP lesson cluster.
- Java examples → Object model: contains · Object-method and constructor examples.
- Java examples → Platform APIs: contains · Standalone Java platform API demonstrations.
- Learning checks → Core types: checks · Small runnable examples complement core type lessons.
- Learning checks → Java examples: supports · Test files are learning-oriented executables alongside the main examples.
- Collections → Threads: relates to · Concurrent collection and thread examples form a cluster.
- OOP → Object model: builds on · OOP lessons reuse core object-model concepts.
- OOP → Basics: reuses · Small lesson-level model classes support OOP examples.
- I/O → File I/O: documents · File and console examples are described in the docs.
- Object model → Object methods: documents · Object-method lessons are described in the docs.