Java Course
Java powers banking systems, Android apps, big-data platforms and countless back-end services. This course takes you from your first println to object-oriented design, collections, streams, records, sealed types, concurrency and testing — finishing with a complete library-management program. It teaches modern Java 25, and points out what differs in the older code you'll meet at work.
What you'll learn
The course has 56 lessons in nine parts:
- Getting Started — what Java is, installing the JDK, program structure, syntax and comments.
- Variables, Types & Strings — primitives, casting, operators, strings, formatting, maths and user input.
- Control Flow —
if,switchexpressions,whileandforloops. - Arrays & Methods — arrays, 2D arrays, methods, overloading, scope and recursion.
- Object-Oriented Programming — classes, constructors, encapsulation, packages, inheritance, polymorphism, interfaces, records and enums.
- Exceptions — handling, throwing and defining exceptions; try-with-resources.
- Collections & Generics — lists, sets, maps, queues, sorting and generic types.
- Functional & Modern Java — lambdas, streams, collectors,
Optional, pattern matching, sealed types and dates. - Real-World Java — files, concurrency and virtual threads, regular expressions, JUnit, build tools and a final project.
Every example in the course was compiled and run with a real Java 25 JDK, and the output shown is the actual output. The Try it yourself editors let you change any example and copy it to run on your own computer with java Main.java.
No previous programming experience is needed.
Practice
- Playground — a starter program to copy and experiment with.
- Exercises — fill-in-the-blank tasks and programming challenges with solutions.
- Quiz — test your understanding across the whole course.
- Syllabus & Study Plan — learning outcomes and a week-by-week schedule.
Lessons
Getting Started
Variables, Types & Strings
- Variables
- Primitive Data Types
- Type Casting
- Operators
- Strings
- String Methods & Formatting
- Math & Numbers
- User Input
Control Flow
Arrays & Methods
Object-Oriented Programming
- Classes & Objects
- Static Members
- Constructors
- Encapsulation & Access Modifiers
- Packages & Imports
- Inheritance
- Polymorphism
- Abstract Classes
- Interfaces
- Records
- Enums
- Nested & Anonymous Classes
- The Object Class: equals, hashCode & toString
Exceptions
Collections & Generics
- Wrapper Classes & Autoboxing
- Generics
- Lists: ArrayList & LinkedList
- Sets
- Maps
- Sorting & Comparators
- Queues, Stacks & Deques
Functional & Modern Java
- Lambdas & Functional Interfaces
- Streams
- Collectors & Grouping
- Optional
- Pattern Matching & Sealed Types
- Dates & Times
Real-World Java
- Working with Files
- Threads & Concurrency
- Regular Expressions
- Unit Testing with JUnit
- Build Tools & Best Practices
- Project: A Library System
Practice
Where to start: begin with Introduction and set up Java in lesson 2 so you can run every example yourself. Afterwards, try Kotlin (another JVM language) or learn to store data with SQL.