Codiqo

Learn Java
five minutes at a time.

Java runs Android apps and huge business systems. It's strongly typed and structured, which makes it a great language for learning to write programs that stay organised as they grow.

Start the Java course free

60 lessons · about 11 hours · beginner friendly

Your first program

public class Main {
    public static void main(String[] args) {
        System.out.println("Hello, Pebble!");
    }
}

Output

Hello, Pebble!

The Codiqo Java course starts at System.out.println() and covers variables, conditions, loops, arrays, methods, collections, classes, inheritance and interfaces. Every example was compiled with every warning switched on.

How the Java lessons work

Learn in small steps

Each lesson explains one idea with worked examples, then asks you about it straight away. About five minutes each.

Write real code

Predict the output, fix the bug, fill the gap and build programs line by line. Every lesson ends with a short program you write yourself, and we run it for real.

Keep it going

Earn XP, open chests, climb weekly leagues and keep your streak alive, with Pebble the penguin cheering you on and Terry the mentor giving hints.

The full Java curriculum

  1. Foundations

    Output, variables, types, input and logic.

    First Steps: Write your first Java programs.

    • Hello, Java: Write a class with main() and print with System.out.println
    • Variables and Types: Store values in int, double, boolean, char and String
    • Arithmetic: Calculate with + - * / % and predict integer division
    • Formatting Output: Use print, printf and comments

    Text and Input: Work with Strings and read input.

    • Strings and Concatenation: Join text and values
    • String Methods: Use length, charAt, substring, indexOf and more
    • Reading Input with Scanner: Read numbers and lines from the keyboard
    • Project: Tip Calculator: Calculate and format a bill split

    Logic: Make true or false decisions.

    • Comparisons and boolean: Compare values and store booleans
    • Logical Operators: Combine conditions with && || and !
    • Casting and Math: Convert types and use the Math class
    • Project: Eligibility Checker: Decide eligibility from several conditions
  2. Control Flow

    Decisions, loops and methods.

    Making Decisions: Run different code depending on conditions.

    • if and else: Run code only when a condition is true
    • else if and Nesting: Choose between several paths
    • switch: Use classic and arrow-style switch
    • Project: Grade Calculator: Turn scores into grades

    Loops: Repeat work with while and for.

    • while and do-while: Repeat while a condition is true
    • for Loops: Count with for and nest loops
    • break and continue: Leave loops early and skip iterations
    • Project: FizzBuzz: Solve the classic FizzBuzz problem

    Methods: Reuse code with methods.

    • Defining Methods: Write and call static methods
    • Parameters and Return Values: Pass values in and get results out
    • Overloading and Scope: Overload methods and understand local variables
    • Project: Temperature Converter: Build a converter from small methods
  3. Data and Collections

    Arrays, lists, maps and strings.

    Arrays: Store many values of the same type.

    • Creating Arrays: Create arrays and read and change items
    • Looping over Arrays: Total, search and use the Arrays class
    • 2D Arrays: Work with grids of values
    • Project: Score Statistics: Summarise a list of scores

    Collections: Use ArrayList and HashMap.

    • ArrayList: Grow and shrink lists of objects
    • HashMap: Look up values by key
    • Iterating Collections: Loop over lists and map entries
    • Project: Word Counter: Count the words in a piece of text

    Working with Text: Compare, build and split strings.

    • equals versus ==: Compare strings correctly
    • StringBuilder: Build text efficiently
    • Splitting and Joining: Break text apart and put it back together
    • Project: Text Analyzer: Report statistics about a sentence
  4. Object-Oriented Java

    Classes, inheritance, interfaces, errors and a complete project.

    Classes and Objects: Model things with your own classes.

    • Classes, Fields and Constructors: Define a class and create objects
    • Methods and this: Give objects behaviour
    • Encapsulation: Use private fields with getters and setters
    • Project: Bank Account: Model an account with safe deposits and withdrawals

    Inheritance and Interfaces: Share behaviour and handle problems.

    • Inheritance: Extend classes and override methods
    • Interfaces and Polymorphism: Program to an interface
    • Exceptions: Throw, catch and create exceptions
    • Project: Shapes: Compute areas through a shared interface

    Capstone Project: Plan and build a complete Java program.

    • Planning and Modelling: Turn an idea into classes
    • Core Logic: Implement the main features
    • Errors and Testing: Handle bad input and check behaviour
    • Polishing: Improve output, structure and readability

Start learning Java

Questions about the Java course

Is the Java course free?

Yes. All 60 Java lessons, practice sessions, leagues and achievements are free. Codiqo Plus is optional and adds unlimited Compile Fuel.

Is it good for complete beginners?

Yes. It starts from your very first line of Java and explains every idea before asking you about it. If you already know some Java, a quick check lets you skip ahead.

How long does it take?

About 11 hours in all: 60 lessons of roughly five to ten minutes, in 4 chapters of 3 units. Most learners do a lesson or two a day.

Do I need to install anything?

No. Codiqo works in your browser and on iPhone and Android. The programs you write run on our servers in a locked-down sandbox, so there's nothing to set up.

What will I build?

Every lesson ends with a short program you write yourself, and the course finishes with "Capstone Project": Plan and build a complete Java program.

Other courses

Learn Python · Learn JavaScript · Learn C · Learn C++ · Learn C#