Java Essentials
Learn Java from absolute zero to exam-ready: your first program, variables, control flow, methods, arrays, object-oriented programming, collections, exceptions, and recursion — the language of Android, enterprise software, and university computer science.
Why learn Java Essentials?
Java runs enterprise backends, Android apps, and a large share of university computer science courses. It is verbose by design, which turns out to be a gift for learners: everything is explicit, so the concepts you learn stay visible in the code.
This track goes from absolute zero to exam-ready. You start with your first program and build through variables, control flow, methods, arrays, and strings into full object-oriented programming with classes, inheritance, and interfaces, then collections, exceptions, and recursion.
The final module is built for students: searching and sorting, file handling, an exam playbook, and a Student Registry capstone that exercises everything the course taught.
Who this course is for
- University students whose CS courses are taught in Java
- Complete beginners aiming at Android or enterprise development
- Developers from other languages needing structured Java quickly
What you'll build and practice
- Complete Java programs with clean, explicit structure
- Classes and interfaces that model real problems
- Collection-based code using lists and maps correctly
- Recursive solutions and classic searching and sorting implementations
- The Student Registry capstone, a complete program built from scratch
What you'll learn
Java Essentials is organized into 10 focused modules. By the end you'll be comfortable with:
- Getting Started
- Variables & Types
- Making Decisions
- Loops
- Methods
- Arrays & Strings
- Classes & Objects
- Inheritance & Interfaces
- Collections & Exceptions
- Exam-Ready Java
Course curriculum
56 lessons across 10 modules. Lessons marked Free preview are readable without an account.
Module 1. Getting Started
What programs are, what Java is, and your first working program
- 5mHow Computers Run ProgramsFree preview
What a program actually is, why programming languages exist, and Java's clever two-step trick — no code required yet.
- 6mWhat is Java?Free preview
Why Java exists, what it powers, why universities teach it — and why Java is NOT JavaScript.
- 8mYour First Java ProgramFree preview
Walk through Hello World line by line: the class, the main method, System.out.println, semicolons, and braces.
- 8mPrinting, Comments & Escape Sequences
print vs println, joining text with +, writing comments, and printing special characters.
- 7mReading Compiler Errors Like a Pro
The compile-run cycle, the anatomy of an error message, and the five errors every Java beginner meets in week one.
Module 2. Variables & Types
Storing numbers and text, doing math, and reading input from the keyboard
- 7mVariables: Your Program's Memory
Declare, initialize, and reassign variables — and learn Java's naming rules.
- 8mThe Primitive Types
int, double, boolean, and char — Java's four essential primitives, and why the compiler cares.
- 8mDoing Math (and the Integer Division Trap)
Arithmetic operators, why 7 / 2 is 3, the remainder operator %, and the shortcuts += and ++.
- 7mType Conversion & Casting
Widening happens automatically; narrowing needs a cast — and casting is how you fix integer division.
- 8mWorking with Strings
Create strings, measure them, grab characters and pieces — and meet the .equals() rule early.
- 9mReading Input with Scanner
Make programs interactive: import Scanner, read numbers and text, and dodge the infamous nextInt/nextLine trap.
Module 3. Making Decisions
Comparisons, if/else, logical operators, switch, and the ternary operator
- 7mComparing Values
The six comparison operators, boolean expressions, and the string-comparison rule that saves exams.
- 8mif, else if, else
Branch your program: if statements, else-if chains, nesting, and why order matters.
- 8mLogical Operators: &&, || and !
Combine conditions with AND, OR, and NOT — plus short-circuiting and the range-check idiom.
- 8mswitch & the Ternary Operator
Clean multi-way branching with switch (and its fall-through trap), plus the one-line if: ?: .
- 9mTracing Practice: Decisions Like an Examiner
Put Module 3 together: trace realistic programs by hand, exactly the way written exams demand.
Module 4. Loops
Repeating work with while, for, do-while, nested loops, and the classic loop algorithms
- 8mwhile Loops
Repeat code while a condition holds — counters, updates, and how loops end (or don't).
- 8mfor Loops
The counting loop: init, condition, update in one line — plus counting down, stepping, and scope.
- 8mdo-while, break & continue
The run-first loop for menus and validation, and the two keywords that redirect any loop.
- 9mNested Loops
Loops inside loops: times tables, star triangles, and how to count total iterations.
- 9mThe Classic Loop Algorithms
The five loop patterns every exam tests: accumulate, count, min/max, search, and digit-processing.
Module 5. Methods
Reusable routines: parameters, return values, scope, overloading, and the Math class
- 8mYour First Methods
Name a block of code once, run it anywhere: defining and calling static methods.
- 8mParameters & Scope
Give methods input: parameters vs arguments, multiple inputs, pass-by-value, and where variables live.
- 8mReturn Values
Methods that hand back results: return types, using returned values, early returns, and boolean predicates.
- 8mOverloading & the Math Class
Same name, different parameters — plus the Math methods every course uses: pow, sqrt, abs, max, round, random.
- 9mBuilding Programs with Methods
Decomposition: turning a problem into small methods, and answering the 'write a method that…' exam question.
Module 6. Arrays & Strings
Fixed-size collections, the classic array algorithms, 2D grids, and string processing
- 8mArrays
One variable, many values: creating arrays, indexing from zero, .length, and the out-of-bounds crash.
- 8mLooping Over Arrays
The index loop and the for-each loop — and the crucial rule about which one can modify elements.
- 9mThe Classic Array Algorithms
Sum & average, min/max with index, linear search, counting, and reversal — the five array questions every exam asks.
- 8m2D Arrays
Grids: rows and columns, nested traversal, and the length rules that exams test.
- 9mString Processing
Loop through strings char by char, build new strings, count and filter — plus StringBuilder for heavy lifting.
- 9mArrays + Methods: The Reference Twist
Pass arrays to methods, return arrays from methods — and learn why a method CAN modify your array.
Module 7. Classes & Objects
Object-oriented programming: writing classes, constructors, encapsulation, and static
- 8mObjects Everywhere
The idea that organizes all modern Java: classes as blueprints, objects as instances, state plus behavior.
- 9mWriting Your First Class
Design and build a complete class from a spec: fields, methods that use them, and objects working together.
- 8mConstructors
Build objects ready-to-use: constructor syntax, the this keyword, overloaded constructors, and the default-constructor rule.
- 8mEncapsulation: private, Getters & Setters
Protect your objects' state: private fields, public getters/setters, and validation at the gate.
- 8mstatic vs Instance
One per class or one per object? static fields, static methods, constants, and why main is static.
- 9mReferences, null, equals & toString
Objects behave like arrays: references, aliasing, null and the NullPointerException, plus writing equals and toString.
Module 8. Inheritance & Interfaces
extends, super, polymorphism, abstract classes, and interfaces — the OOP exam core
- 8mInheritance: extends
Build new classes on top of existing ones: extends, is-a relationships, and what gets inherited.
- 9msuper & Method Overriding
Chain constructors up the hierarchy with super(), and replace inherited behavior by overriding.
- 9mPolymorphism
One variable type, many behaviors: superclass references, dynamic dispatch, casting, and instanceof.
- 8mAbstract Classes
Classes that exist only to be extended: abstract methods, why you can't instantiate, and the template pattern.
- 9mInterfaces
Pure contracts: implements, multiple interfaces, interface vs abstract class, and Comparable.
- 10mOOP on Exams: The Killer Patterns
The hierarchy-trace drill, design-from-spec, and every OOP trap from Modules 7–8 in one battle-tested checklist.
Module 9. Collections & Exceptions
ArrayList, HashMap, HashSet, generics, and handling errors with try/catch
- 9mArrayList
The growable list: add, get, set, remove, size — plus generics syntax and wrapper types.
- 9mArrayList Algorithms & the Removal Trap
The Module-6 algorithms on ArrayLists, building filtered lists, and the infamous remove-while-iterating bug.
- 9mHashMap
Key → value lookup: put, get, containsKey, getOrDefault, looping with keySet — and the frequency-count exam classic.
- 8mHashSet & Choosing Collections
The uniqueness collection, the dedupe pattern, and the list/set/map decision guide.
- 9mExceptions & try/catch
Crash-proof your programs: how exceptions propagate, try/catch/finally, and catching multiple types.
- 9mThrowing Exceptions & Robust Code
Throw your own exceptions, understand checked vs unchecked and throws, and build the bulletproof input loop.
Module 10. Exam-Ready Java
Recursion, searching & sorting, files, a full capstone, and the exam playbook
- 9mRecursion I: The Leap of Faith
Methods that call themselves: base case, recursive case, the call stack, and tracing factorial by hand.
- 9mRecursion II: The Classic Problems
Fibonacci, sum of digits, power, string reversal — the four recursions exams actually set, plus recursion vs loops.
- 10mSearching & Sorting
Binary search's halving magic, selection sort pass by pass — and how to answer 'how many comparisons?'
- 8mReading & Writing Files
Persist data: Scanner over a File, the hasNextLine loop, PrintWriter output, and why close() matters.
- 12mCapstone: The Student Registry
Build a complete system — encapsulated class, ArrayList registry, menu loop, search, statistics — the way exams compose everything.
- 10mThe Exam Playbook
How to take a Java exam: the four question types, the tracing protocol, the trap master-list, and your revision map.
Frequently asked questions
- My university course uses Java. Will this track match what I am taught?
- That is one of its explicit goals. It covers the standard university sequence: fundamentals, OOP with inheritance and interfaces, collections, exceptions, recursion, and searching and sorting, and the final module includes an exam playbook for exactly those topics.
- Is Java still relevant compared to newer languages?
- Very. It remains a top language by jobs and by running code: banking systems, Android, and enormous enterprise codebases. Its ecosystem and tooling are among the most mature in existence, and Java skills transfer almost directly to Kotlin and C#.
- Do I need to install the JDK to take this course?
- No. All 56 lessons run in the browser with instant feedback. When you are ready to develop locally, installing a JDK and an IDE will make immediate sense because you will already know the language.
- Does Java Essentials prepare me for Android development?
- It builds the Java foundation Android assumes: OOP, collections, exceptions, and interfaces. Android additionally involves its own SDK and lifecycle, and modern Android leans Kotlin, but Kotlin is a short hop once your Java is solid.
Ready to start Java Essentials?
Create a free account to track progress, earn XP, and get instant help from the AI tutor as you code.
Create your free account