Free · Open · Made for learners
Learn Java,
one chapter at a time.
A calm, book-style course with clear notes, runnable code and diagrams — from your first Hello, World to the JVM internals. Built for students and teachers.
- 51
- chapters available
- 51
- in the full course
- 7
- parts
Java Foundations
Syntax, data, control flow and the building blocks of every program.
01Introduction to JavaBuild a strong mental model of what Java is, why it was created, how Java programs run, why Java is called platform-independent, and where Java fits in the software world.02Setup & Your First Java ProgramSet up a proper Java development environment, understand the JDK, learn the java and javac commands, create your first Java program, compile it, run it, understand the basic structure of the program, and learn how…03Variables & Data TypesUnderstand how Java stores and works with data. By the end, you should be comfortable creating variables, choosing the correct data type, assigning values, reading values, performing basic conversions, and…04Operators & ExpressionsLearn how Java performs calculations, comparisons, assignments, logical operations, and other transformations on values. Operators are the tools that let a program actually do something with the variables you learned…05Input & Output in JavaIn this chapter, we learn how a Java program communicates with the outside world: how it displays information on the screen and how it accepts information from the user.06Conditions in JavaConditions allow a Java program to make decisions. Instead of always executing the same code, a program can check a condition and choose what to do.07Loops in JavaLoops allow a Java program to repeat a block of code. They are one of the most important concepts in programming because many problems require the same operation to be performed multiple times.08Methods in JavaMethods are one of the most important building blocks of Java programs. A method lets us give a name to a piece of work, reuse that work, organize a large program into smaller parts, and make code easier to…09Arrays in JavaAn array is one of the first important data structures you learn in Java. It allows you to store multiple values under one variable name and access those values using indexes.10Strings in JavaStrings are one of the most important parts of Java. Almost every real application works with text: names, messages, passwords, emails, URLs, file paths, JSON, commands, database values, and user input.
Object-Oriented Programming
The heart of Java: classes, objects, inheritance, polymorphism and design.
11OOP Fundamentals in JavaThis chapter begins the most important section of the Java course: Object-Oriented Programming (OOP).12Classes & Objects in JavaThis chapter goes deeper into the two most important building blocks of Java OOP:13Constructors in Java — A Complete, Detailed Guide14this & static in JavaThis chapter covers two Java concepts that appear everywhere in object-oriented programming:15EncapsulationEncapsulation is one of the most important ideas in Object-Oriented Programming.16InheritanceInheritance is one of the major concepts of Object-Oriented Programming.17Method OverloadingMethod overloading is one of the most useful features of Java methods.18Method OverridingMethod overriding is one of the most important concepts in Java OOP.19PolymorphismPolymorphism is one of the four major pillars of Object-Oriented Programming.20AbstractionAbstraction is one of the four major pillars of Object-Oriented Programming.21InterfacesInterfaces are one of the most important parts of Java OOP.22OOP RelationshipsIn the previous chapters, you learned the major OOP mechanisms:23OOP DesignIn Chapters 11–22, you learned how Java supports object-oriented programming:
Core Java APIs
Packages, exceptions, files, generics, enums and dates.
24Packages & Access ModifiersIn earlier chapters, you learned how to create classes, objects, constructors, interfaces, and well-designed OOP systems. Now learn how Java organizes classes into packages and controls which parts of a program can…25Exception HandlingPrograms do not always run exactly as expected. A file may not exist, a user may enter invalid input, a network request may fail, or code may try to divide by zero.26File Handling in Java27Wrapper Classes in Java28Enums in Java29Generics in Java30Java Collections Framework OverviewGoal: Understand why Java has collections, how the Collections Framework is organized, when to use each major collection type, and how to work with collections safely and effectively.
Collections Framework
Lists, sets, maps, queues and sorting.
31List Interface and ArrayListGoal: Learn the List interface, understand how ArrayList works, master its common methods, compare it with other list implementations, and practise using lists in real Java programs.32Set Interface: HashSet, LinkedHashSet, and TreeSetGoal: Understand what a Set is, how Java prevents duplicates, how HashSet, LinkedHashSet, and TreeSet differ, and how to use sets in practical programs.33Queue, Deque, and PriorityQueueGoal: Understand how Java processes elements in queues, how Deque supports both ends, how to use ArrayDeque as a queue or stack, and how PriorityQueue orders elements by priority.34Map Interface and HashMapGoal: Understand how Java maps store key-value pairs, master HashMap and its methods, learn how hashing and equality work, and practise building useful programs with maps.35LinkedHashMap, TreeMap, and Map Views36Advanced Map Methods and ConcurrentHashMap
Functional Java
Lambdas, functional interfaces, streams and Optional.
Concurrency & the JVM
Threads, memory, garbage collection, reflection and modern Java.
41Lambda Expressions and Functional Interfaces42Java Stream API — Creating Streams and Intermediate Operations43Java Stream API — Terminal Operations, Collectors, and Reduction44Optional, Date and Time API, and Modern Java Utility Features45Multithreading Fundamentals — Threads, Runnable, and Thread Lifecycle46Synchronization, Race Conditions, synchronized, volatile, and Locks
Projects & Practice
Put it all together and prepare for interviews.
47ExecutorService, Thread Pools, Callable, Future, and Asynchronous Task Management48CompletableFuture, Asynchronous Pipelines, Combining Tasks, and Error Handling49Java Virtual Machine (JVM), Memory Areas, Garbage Collection, and Performance Basics50Modern Java Features, Best Practices, Project Integration, and Final Course Revision51Java Master Course — Mega Interview Questions, Detailed Answers, and Coding PracticeHow to use this file
Java Interview & Practice
Use these prompts after the course to review concepts, explain your thinking, and practise problem solving.
Q01What is the difference between a class and an object?
Q02When would you choose an interface over an abstract class?
Q03How does HashMap find and store a value?
Q04What is the difference between == and equals()?
Q05Explain the Java thread lifecycle and the difference between start() and run().
Q06What is the difference between heap memory and stack memory?
Q07How does garbage collection work, and what can cause a memory leak?
Q08Solve a collection or string problem and explain its time complexity.