Skip to content

deepakgupta7403/Hello-Java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hello-Java

A hands-on, topic-by-topic walkthrough of the Java programming language (targeting Java 21 LTS). Every topic is a runnable .java file with theory in the top Javadoc and worked examples in main(). The expected console output is also included as comments inside each main() so you can verify your run.

Project SDK: JDK 21 — set in .idea/misc.xml. Files under src/Phase9_ModernJavaAndModules/ModernJava and several others use Java 21 features (pattern matching for switch, record patterns, sequenced collections, virtual threads, …).

Each section below links straight to the source file(s) in this repository.


Learning Phases at a Glance

Work through the phases in order. Within a phase, files are self-contained — read them in the order they appear.

Phase Theme Sections
0 Setup & First Programs Hello world, JVM/JDK/JRE, Input / Output
1 Core Language Types, variables, operators, control flow, enums
2 Methods, Arrays, Strings The everyday building blocks
3 Object Orientation Classes, interfaces, nested classes
4 Errors & Type Safety Exceptions, Optional, Generics, Annotations
5 Collections, Lambdas & Streams Data structures + functional pipelines
6 Runtime, Memory, Regex, Reflection Below the surface
7 Concurrency Threads, synchronization, virtual threads
8 Practical APIs File I/O, Date & Time, HTTP Client
9 Modern Java & Modules Java 10 → 21 features, JPMS

Estimated pace if you read one phase per week: 9 weeks. Bear down on the projects (Banking, Employee, Face Detection, Snake Game) as you reach them — they're where the concepts click.


Phase 0 — Setup & First Programs

Get a JDK installed, understand what the JDK / JRE / JVM are, write your first main(), and figure out how Java reads and writes the console.

First Programs

Topic Source
Hello World HelloWorld.java
Is main compulsory? IsMainCompulsory.java
Class name vs file name ClassNameMyth/Hello.java

Foundations & Tooling

# Topic Source
1 Introduction to Java Introduction.java
2 Download and Install Java InstallJava.java
3 JDK vs JRE vs JVM JDKvsJREvsJVM.java
4 Taking Input Scanner · BufferedReader · Console
5 Printing Output PrintMethods.java · FormattedOutput.java

Phase 1 — Core Language

Identifiers, keywords, types, variables, operators, control flow, enums. Master this and every later phase becomes easier.

# Topic Source
1 Identifiers Identifiers.java
2 Keywords Keywords.java
3 Data Types (Intro) DataTypesIntro.java
4 Primitive Data Types byte · short · int · long · float · double · char · boolean
5 Wrapper Classes WrapperClassesIntro.java · AutoboxingUnboxing.java
6 Variables Instance · Local · Static · Scope
7 Operators Arithmetic · Relational · Logical · Bitwise & Shift · Assignment · Unary · Ternary · instanceof
8 Decision Making if · if-else · if-else-if · nested-if · switch
9 Loops and Jump Statements for · while · do-while · enhanced for · infinite loop · for loop notes · break · continue · return · labels
10 Type Conversion Automatic · Explicit · Widening
11 Comments Single-line · Multi-line · Documentation (Javadoc)
12 Enumerations Intro · Outside class · Custom values · Constructor · Methods · In switch · Main inside enum
13 Special Keywords final
14 Extras / Interview Tidbits Facts about null · Underscore in numbers · Does Java support goto? · Object memory allocation · Function currying · Binary search · Sorting

Phase 2 — Methods, Arrays, Strings

The bread-and-butter library types and the keyword you'll use the most. Strings are immutable; arrays are fixed-size; methods are how you organise behaviour.

Methods

# Topic Source
1 Introduction (syntax, overloading, pass-by-value, recursion) MethodIntroduction.java
2 Static Methods vs Instance Methods StaticVsInstanceMethods.java
3 Access Modifiers (public / protected / package-private / private) AccessModifiers.java
4 Command Line Arguments (String[] args) CommandLineArguments.java
5 Variable Arguments (Varargs ...) Varargs.java
6 Method References (::) — Java 8+ MethodReferences.java
7 Interface Methods — default / static / private — Java 8/9 InterfaceMethods.java

Arrays

# Topic Source
1 Introduction (declare, init, iterate, defaults, pitfalls) ArrayIntroduction.java
2 Multi-Dimensional Arrays (2D, 3D, deepToString) MultiDimensionalArrays.java
3 Jagged Arrays (varying row lengths, Pascal's triangle) JaggedArrays.java
4 java.util.Arrays utility class (sort, search, copy, fill, equals, stream) ArraysClass.java
5 Final Arrays (reference vs contents, immutability patterns) FinalArrays.java

Strings

# Topic Source
1 Introduction (pool, intern, char[] bridge, compact strings) StringIntroduction.java
2 Why Strings are Immutable (pool, threads, security, hash caching) StringImmutability.java
3 String Concatenation (+, concat, join, StringJoiner, perf trap) StringConcatenation.java
4 String Methods (every important method by category) StringMethods.java
5 StringBuffer Class (synchronized, full method reference) StringBufferClass.java
6 StringBuilder Class (non-synchronized, full method reference) StringBuilderClass.java
7 String vs StringBuffer vs StringBuilder (table + benchmark) StringVsBufferVsBuilder.java
8 Modern Features — Java 11/12/15/21 (strip, repeat, lines, transform, text blocks, case String s when …) ModernStringFeatures.java

Phase 3 — Object Orientation

Java's organising paradigm — classes, objects, and the four pillars (abstraction, encapsulation, inheritance, polymorphism). Then interfaces, the second pillar of abstraction, and nested classes that finish the picture.

OOP Concepts

# Topic Source
1 Introduction (the four pillars in one mini-demo) OopIntroduction.java
2 Classes & Objects Initializing object · Ways to create an object
3 Constructors (default / parameterized / overloading / chaining / copy / private) Constructors.java
4 Object Class (equals / hashCode / toString / clone / getClass / records) ObjectClassMethods.java
5 Abstraction Abstract class · Interfaces · Abstract vs Interface
6 Encapsulation TestEncapsulation.java
7 Inheritance Intro · Single · Multi-level · Hierarchical · Multiple (interfaces) · Hybrid
8 Polymorphism (overloading + overriding + dynamic dispatch + covariant returns) Polymorphism.java
9 Packages and Imports (single / wildcard / static, package-private access) PackagesAndImports.java
10 Sealed Classes — Java 17+ (sealed / non-sealed / permits) SealedClassesDemo.java
11 Project: Simple Banking Application Account · SavingsAccount · CheckingAccount · Transaction (record) · Bank · Runner: BankingApp.java
12 Serialization (extra) Demo 1 · Demo 2

Interfaces

# Topic Source
1 Interfaces — full tour (abstract / default / static / private members, multiple impl, interface inheritance) InterfaceIntro.java
2 Class vs Interface (side-by-side, real-world JDK pattern) ClassVsInterface.java · longer version
3 Functional Interface (SAM, @FunctionalInterface, java.util.function, composition, lambdas, comparators) FunctionalInterfaceDemo.java
4 Nested Interface (inside class, inside interface, private nested) NestedInterface.java
5 Marker Interface (Serializable, custom marker, annotation alternative, generic upper bound) MarkerInterface.java
6 Sealed Interfaces — Java 17+ (permits, non-sealed, exhaustive switch) SealedInterfaceDemo.java
7 Project: Employee Management System Employee (sealed) · FullTimeEmployee · PartTimeEmployee · Contractor · Intern · Promotable · Auditable (marker) · EmployeeFilter (functional) · EmployeeRepository · Runner: EmployeeApp.java

Nested & Inner Classes

# Topic Source
1 Introduction (the four kinds at a glance) NestedClassesIntroduction.java
2 Static Nested Classes (Builder, nested records, hidden helpers) StaticNestedClass.java
3 Inner (member) Classes (Outer.this, leak risk, iterators) InnerClass.java
4 Local & Anonymous Classes (capture rules, lambda vs anonymous) LocalAndAnonymousClass.java

Phase 4 — Errors & Type Safety

Mechanisms for handling things going wrong, making "absent values" explicit in the type system, parameterising types safely, and decorating code with metadata that tools can read.

Exception Handling

# Topic Source
1 Introduction (hierarchy, checked vs unchecked, stack trace) ExceptionIntroduction.java
2 Try-Catch Block (single / multiple / multi-catch / nested / finally) TryCatchBlock.java
3 final, finally, finalize — three confusable keywords FinalFinallyFinalize.java
4 throw and throws — raise vs declare, propagation, re-throw ThrowAndThrows.java
5 Custom Exceptions (checked + unchecked, carrying extra data) CustomException.java
6 Chained Exceptions (getCause, initCause, suppressed vs cause) ChainedException.java
7 Null Pointer Exceptions (six causes, helpful NPE Java 14+, Optional) NullPointerExceptions.java
8 Exception Handling with Method Overriding (the throws rule) ExceptionInOverriding.java
9 Try-with-resources — Java 7+ / 9+ (AutoCloseable, suppressed exceptions) TryWithResources.java
10 Best Practices (top-10 dos & don'ts with code) ExceptionBestPractices.java

Optional<T>

# Topic Source
1 Optional<T> (creation, transforms, anti-patterns, primitive variants) OptionalDemo.java

Generics

# Topic Source
1 Introduction (before/after, type parameter conventions) GenericsIntroduction.java
2 Generic Classes (single + multi-param, inheritance, diamond) GenericClasses.java
3 Generic Methods (type inference, method-level type params) GenericMethods.java
4 Generic Interfaces (Comparable, Function, custom contracts) GenericInterfaces.java
5 Bounded Type Parameters (<T extends X>, multi-bound &) BoundedTypeParameters.java
6 Wildcards (?, ? extends, ? super) Wildcards.java
7 PECS Principle (Producer Extends, Consumer Super) PecsPrinciple.java
8 Type Erasure (runtime behaviour, bridge methods, reflection) TypeErasure.java
9 Generic Restrictions (no primitives / no new T() / no generic arrays / no parameterised instanceof) GenericRestrictions.java
10 Recursive Type Bounds (<T extends Comparable<T>>, self-typed builders, Enum<E extends Enum<E>>) RecursiveTypeBounds.java
11 Heap Pollution + @SafeVarargs HeapPollutionAndSafeVarargs.java
12 Modern Generics — Java 7 → 21 (diamond, var, generic records, sealed generic interfaces, generic record patterns in switch) ModernGenerics.java

Annotations

# Topic Source
1 Introduction (the four families, retention levels) AnnotationsIntroduction.java
2 Built-In Annotations (@Override, @Deprecated, @SuppressWarnings, @FunctionalInterface, @SafeVarargs) BuiltInAnnotations.java
3 Custom Annotations (@Retention, @Target, @Repeatable, @Inherited, type-use) CustomAnnotations.java
4 Runtime Annotations (reading via reflection, mini AOP) RuntimeAnnotations.java

Phase 5 — Collections, Lambdas & Streams

Pick the right container, then transform data declaratively with lambdas and the Stream API.

Collections

0. Framework Overview

Topic Source
Framework Introduction (hierarchy diagram, big-O cheatsheet) CollectionsIntroduction.java
Modern Features — Java 8 → 21 (factories, Collectors, Stream.toList, Sequenced Collections) ModernCollections.java

1. Core Interfaces

Topic Source
Collection Interface CollectionInterface.java
List Interface ListInterface.java
Set Interface SetInterface.java
Queue Interface QueueInterface.java
Deque Interface DequeInterface.java
Map Interface MapInterface.java

2. List Implementations

Topic Source
ArrayList ArrayListDemo.java
LinkedList LinkedListDemo.java
Vector + Stack (legacy) VectorAndStack.java
AbstractList + AbstractSequentialList (skeleton classes) AbstractListClasses.java

3. Set Implementations

Topic Source
HashSet HashSetDemo.java
LinkedHashSet LinkedHashSetDemo.java
TreeSet TreeSetDemo.java
EnumSet (bit-vector enum keys) EnumSetDemo.java
SortedSet + NavigableSet interfaces SortedAndNavigableSet.java
ConcurrentSkipListSet ConcurrentSkipListSetDemo.java

4. Queue / Deque Implementations

Topic Source
PriorityQueue (heap, Top-K) PriorityQueueDemo.java
ArrayDeque (modern stack + queue) ArrayDequeDemo.java
BlockingQueue (ArrayBlockingQueue / LinkedBlockingQueue / SynchronousQueue) BlockingQueueDemo.java
ConcurrentLinkedQueue (lock-free) ConcurrentLinkedQueueDemo.java
AbstractQueue (skeleton class + custom BoundedQueue) AbstractQueueDemo.java

5. Map Implementations

Topic Source
HashMap HashMapDemo.java
LinkedHashMap (insertion + access order, LRU cache) LinkedHashMapDemo.java
TreeMap (sorted, NavigableMap) TreeMapDemo.java
WeakHashMap (GC-eligible keys) WeakHashMapDemo.java
IdentityHashMap (== instead of equals) IdentityHashMapDemo.java
Hashtable (legacy) HashtableDemo.java

6. Utility & Supporting Classes

Topic Source
Collections utility class CollectionsClass.java
Iterable interface (custom for-each types) IterableDemo.java
Iterator / ListIterator / Spliterator IteratorDemo.java
Enumeration (legacy 1.0 iteration) EnumerationDemo.java
Comparator and Comparable ComparatorComparable.java

7. Concurrency Collections

Topic Source
ConcurrentHashMap (lock-striped) ConcurrentHashMapDemo.java
CopyOnWriteArrayList (snapshot iterator, listener-list pattern) CopyOnWriteArrayListDemo.java
ConcurrentLinkedQueue (lock-free) ConcurrentLinkedQueueDemo.java
BlockingQueue family BlockingQueueDemo.java
ConcurrentSkipListSet ConcurrentSkipListSetDemo.java

Project

Topic Source
Face Detection System (uses every collection type) Face · Detector · FaceRepository · Runner: FaceDetectionApp.java

Lambda Expressions and Streams

Foundations

Topic Source
Lambda Expressions (syntax forms, capture, target typing, this) LambdaExpressions.java
Method References (::) — four forms in stream context MethodReferences.java

Streams

Topic Source
Stream Introduction (laziness, one-shot, decl vs imp) StreamIntroduction.java
Stream Creation (15 ways) StreamCreation.java
Stream Pipeline (Source / Intermediate / Terminal architecture) StreamPipeline.java
Intermediate Operations (filter/map/flatMap/sorted/distinct/limit/skip/peek/takeWhile/dropWhile/mapMulti) IntermediateOperations.java
Terminal Operations (forEach/collect/reduce/count/match/find/min/max/toArray/toList) TerminalOperations.java
Collectors (toList/toMap/groupingBy/partitioningBy/joining/teeing/collectingAndThen) CollectorsClass.java

Stream Types

Topic Source
Sequential vs Parallel (when each helps, side-effect trap, splittability) SequentialVsParallel.java
Infinite Streams (iterate/generate/limit/takeWhile) InfiniteStreams.java
Primitive Streams (IntStream/LongStream/DoubleStream, boxing perf) PrimitiveStreams.java
Stream vs Collection (side-by-side, crossing back and forth) StreamVsCollection.java
File I/O via streams (Files.lines/list/walk, append, write) StreamFileIO.java
Modern Streams — Java 9 → 21 (takeWhile/dropWhile, iterate(3-arg), mapMulti, toList, teeing, sequenced collections) ModernStreams.java

Real-World Examples

Topic Source
Filtering Employees by Salary EmployeeSalaryExample.java
Streams in a Grocery Store GroceryStoreExample.java
Grouping Books by Author BookGroupingExample.java

Phase 6 — Runtime, Memory, Regex, Reflection

What the JVM actually does with your code, how to manipulate text with patterns, and how to inspect and dispatch dynamically.

Memory Allocation

# Topic Source
1 Java Memory Management (overview, heap inspection, default GC) MemoryManagementIntro.java
2 How Java Objects Are Stored in Memory (header, fields, padding, references, compressed oops) ObjectsInMemory.java
3 Types of Memory Areas (Method Area / Heap / Stack / PC / Native, generations) JvmMemoryAreas.java
4 Stack vs Heap (side-by-side, pass-by-value, escape analysis) StackVsHeap.java
5 Garbage Collection (reachability, mark/sweep, generations, weak/soft refs, Cleaner) GarbageCollection.java
6 Types of JVM Garbage Collectors (Serial / Parallel / G1 / ZGC / Shenandoah / Epsilon) GarbageCollectors.java
7 Memory Leaks (5 patterns + fixes) MemoryLeaks.java
8 Modern Memory Features — Java 9 → 21 (Compact Strings, Cleaner, direct buffers, virtual threads, Generational ZGC) ModernMemoryFeatures.java

Regex

# Topic Source
1 Introduction (Pattern + Matcher, escapes, matches vs find vs lookingAt) RegexIntroduction.java
2 Matcher Class (every important method, named groups, replaceAll, region, results) MatcherClass.java
3 Character Class (custom sets, predefined \d/\w/\s, POSIX, Unicode) CharacterClass.java
4 Quantifiers (* + ? {n,m}, greedy vs reluctant vs possessive, backtracking) Quantifiers.java
5 Metacharacters & Anchors (^ $ \b \A \z \G, Pattern.quote) MetacharactersAndAnchors.java
6 Groups & Backreferences ((…) (?:…) (?<name>…) \1 ${name}) GroupsAndBackreferences.java
7 Lookahead & Lookbehind ((?=…) (?!…) (?<=…) (?<!…), password rules) LookaroundAssertions.java
8 Flags (CASE_INSENSITIVE, MULTILINE, DOTALL, COMMENTS, UNICODE_CHARACTER_CLASS, scoped (?i:…)) RegexFlags.java
9 Modern Features — Java 8/9/11/21 (splitAsStream, asPredicate, Matcher.results, replaceAll(Function), pattern-matching switch on String) ModernRegexFeatures.java
10 Real-World Examples (email, phone, URL, IPv4, password, ISO date, hex color, slug, CSV) RegexExamples.java

Reflection API

# Topic Source
1 Introduction (Class, Method, Field, basics) ReflectionIntroduction.java
2 Class / Method / Field in depth (overloads, parameters, generic types) ClassAndMethodReflection.java
3 Dynamic Invocation (MethodHandle, dynamic Proxy, mini AOP) DynamicInvocation.java

Phase 7 — Concurrency

Multiple threads of execution inside one JVM — concurrent and parallel work, the synchronization primitives that keep shared state sane, and the Java 21 virtual-thread world.

1. Foundations

# Topic Source
1 Multithreading Introduction (concurrency vs parallelism, why threads) MultithreadingIntroduction.java
2 Threads (java.lang.Thread API tour) Threads.java
3 Thread Lifecycle (NEW/RUNNABLE/BLOCKED/WAITING/TIMED_WAITING/TERMINATED) ThreadLifecycle.java
4 The Main Thread (default properties, JVM exit rules) MainThread.java
5 Thread.start() vs Thread.run() StartVsRun.java
6 Thread.sleep(...) ThreadSleepMethod.java
7 Thread.join(...) ThreadJoinMethod.java
8 Thread.yield() and onSpinWait ThreadYieldMethod.java
9 Thread Interruption (cooperative cancellation) ThreadInterruption.java
10 Thread Priority (MIN/NORM/MAX, OS mapping) ThreadPriority.java
11 Daemon Threads (JVM exit semantics) DaemonThread.java

2. Creating Work

Topic Source
Runnable Interface (lambdas, composition, decoration) RunnableInterface.java
Callable & Future (results, exceptions, cancellation, FutureTask) CallableAndFuture.java

3. Correctness (synchronization, JMM, atomics)

Topic Source
Java Synchronization (synchronized blocks/methods, monitor locks) JavaSynchronization.java
Thread Safety (strategies, levels, compound-op traps) ThreadSafety.java
Race Conditions, Livelock, Starvation RaceConditionStarvationLivelock.java
Java Memory Model (happens-before, safe publication) JavaMemoryModel.java
volatile Keyword (visibility, DCL singleton) VolatileKeyword.java
wait / notify / notifyAll WaitNotifyNotifyAll.java
Producer-Consumer (three implementations) ProducerConsumer.java
ThreadLocal<T> ThreadLocalDemo.java
Atomic Variables (Atomic*, LongAdder, ABA) AtomicVariables.java

4. Locks

Topic Source
Locks in Java (Lock interface tour) LocksInJava.java
Lock vs Monitor in Concurrency LockVsMonitor.java
Lock Framework vs synchronized LockFrameworkVsSync.java
ReentrantLock (fairness, tryLock, conditions) ReentrantLockDemo.java
ReadWriteLock (many readers, one writer) ReadWriteLockDemo.java
StampedLock (optimistic reads) StampedLockDemo.java
Deadlock (Coffman, detection, prevention) DeadlockDemo.java

5. Executors and high-level concurrency

Topic Source
Thread Pools (ThreadPoolExecutor, queues, rejection policies) ThreadPools.java
Executor Framework (ExecutorService tour) ExecutorFramework.java
ScheduledExecutorService (fixedRate vs fixedDelay) ScheduledExecutorDemo.java
ForkJoinPool (divide-and-conquer, work stealing) ForkJoinPoolDemo.java
CompletableFuture (composable async) CompletableFutureDemo.java

6. Synchronizers

Topic Source
CountDownLatch (one-shot gate) CountDownLatchDemo.java
CyclicBarrier (resettable, barrier action) CyclicBarrierDemo.java
Semaphore (permits, binary, fair) SemaphoreDemo.java
Phaser (variable parties, per-phase actions) PhaserDemo.java

7. Java 21 — modern concurrency

Topic Source
Virtual Threads (JEP 444 finalised) VirtualThreads.java
Structured Concurrency (JEP 453 preview) StructuredConcurrency.java
Scoped Values (JEP 446 preview) ScopedValuesDemo.java

8. End-to-end + project

Topic Source
Multithreading Complete Tutorial (one-file tour) MultithreadingCompleteTutorial.java
Project: Snake Game (Swing render thread + game loop thread + locked state) Direction · Cell · GameState · GameLoop · SnakeBoard · Runner: SnakeGame.java

Phase 8 — Practical APIs

The APIs you'll actually reach for in business apps: reading and writing files, handling dates and times, and talking to HTTP services.

File I/O

# Topic Source
1 Introduction (java.io vs java.nio.file, which class for what) FileIOIntroduction.java
2 Byte Streams (InputStream / OutputStream, File* impls) ByteStreams.java
3 Character Streams (Reader / Writer, charset traps, bridges) CharacterStreams.java
4 Buffered Streams (Buffered*, readLine, lines()) BufferedStreams.java
5 Data Streams (DataInput/OutputStream for primitives) DataStreams.java
6 Object Streams (Java serialization in/out) ObjectStreams.java
7 Path and Files (the modern API) FilesAndPaths.java
8 Walking the file system (list/walk/find/lines) FilesWalkAndList.java
9 FileChannel (random access, memory mapping, locks) FileChannelDemo.java
10 WatchService (observe FS changes) WatchServiceDemo.java
11 Modern File I/O — Java 11+ (readString, writeString, mismatch) ModernFileIO.java

Date and Time API

# Topic Source
1 Introduction (the headline types, why java.time) DateTimeIntroduction.java
2 LocalDate / LocalTime / LocalDateTime (zone-less locals) LocalDateLocalTimeLocalDateTime.java
3 Instant (the global timeline) InstantDemo.java
4 ZonedDateTime / OffsetDateTime (zones, DST, fixed offsets) ZonedDateTimeDemo.java
5 Duration (clock-length differences) DurationDemo.java
6 Period (calendar-length differences) PeriodDemo.java
7 DateTimeFormatter (parse and print) DateTimeFormatterDemo.java
8 Legacy bridge (Date / Calendar / Timestampjava.time) LegacyDateConversions.java

HTTP Client (Java 11+)

# Topic Source
1 Introduction (HttpClient, HttpRequest, body handlers, body publishers) HttpClientIntroduction.java
2 Synchronous and Asynchronous Requests (send vs sendAsync, fan-out, errors) SyncAndAsyncRequests.java
3 WebSocket (full-duplex, listeners, backpressure) WebSocketDemo.java

Phase 9 — Modern Java & Modules

Language and library features that landed between Java 8 and Java 21, and the module system added in Java 9. By the end of this phase you can read any modern Java codebase fluently.

Modern Java (10 → 21)

Feature Since Source
var — local variable type inference Java 10 VarLocalTypeInference.java
Switch expressions (->, yield) Java 14 SwitchExpression.java
Pattern matching for switch (with when, null cases) Java 21 PatternMatchingSwitch.java
Records and record patterns (deconstruction) Java 16 / 21 RecordsAndPatterns.java
Sequenced Collections (getFirst, getLast, reversed) Java 21 SequencedCollections.java

Java Platform Module System (JPMS)

# Topic Source
1 Introduction (why modules, anatomy of module-info.java) ModulesIntroduction.java
2 Module Examples (catalogue of module-info.java shapes) ModuleExamples.java
3 ServiceLoader (the built-in plugin / SPI mechanism) ServiceLoaderDemo.java

How to Run

This is a plain-Java project — no Maven, no Gradle. From the repo root:

# Compile one file
javac src/Phase0_SetupAndFirstPrograms/Introduction/Introduction.java

# Run it (use the fully qualified class name including the package)
cd src
java Phase0_SetupAndFirstPrograms.Introduction.Introduction

Or from your IDE: right-click any .java file containing a main() and choose Run.

Single-file mode (Java 11+)

java src/Phase0_SetupAndFirstPrograms/Introduction/Introduction.java

How Each File Is Structured

Every .java file is self-contained:

  1. A theory block at the top (Javadoc style) — read this first.
  2. A main() method with concrete, runnable examples grouped into numbered sections.
  3. Expected output captured inline as comments where useful.

Most folders also have one <Topic>.README.md per file with the same theory in markdown form — handy for browsing on GitHub without opening the source.


Pace and Projects

Phase Suggested duration Capstone
0–1 Week 1
2 Week 2
3 Week 3 Banking App, Employee App
4 Week 4
5 Weeks 5–6 Face Detection
6 Week 7
7 Weeks 8–9 Snake Game
8 Week 10
9 Week 11

Happy hacking!

About

In this repository we learn in detail about JAVA Programming.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors