Skip to content
Learn at your own pace

Learn Java

Build a foundation in Java syntax, object-oriented design, collections and reliable application code.

A student connects colorful building blocks beside a laptop, illustrating a sequence of programming instructions.
One small step becomes a working program.
24lessons in 6 stages
48practice exercises
24project milestones
96quiz questions
96review cards

A clear place to start

Java is a typed programming language used for applications and services. You compile source files, then the Java Virtual Machine runs the compiled program.

What you need first

No Java experience is required. Learn variables, conditions, loops, and methods through the starter program. You will need a JDK and a text editor.

Start with these ideas

  1. A type describes an allowed kind of value: int score = 10 stores a whole number.
  2. A method groups a task. A class groups related state and behavior, such as a Task with a title and completion operation.
  3. A list preserves ordered entries, a set represents unique entries, and a map finds a value by a key.

Connect it to a real project

Build a command-line task tracker, then practice persistence, tests, and service boundaries using the same task rules.

Study one concept at a time. Explain its everyday example in your own words, predict the worked example’s result, then try a small change. Use practice and quiz feedback to decide what to revisit. You can spread a lesson across several study sessions.

Set up your environment Tools, setup steps, and completion requirements

Start with the ideas above, then set up the tools below. Return to the starter example whenever a new term feels unfamiliar.

text
java --version
javac --version
# Use a supported JDK and record its version in the README.
# Save standalone examples as Main.java.
javac Main.java
java Main
# Use a Maven or Gradle wrapper for the portfolio application.

A free account saves your progress, notes, exercise evidence and spaced review cards. To complete a lesson, score at least 80% on its quiz, finish both exercises and the project checklist, and submit your project link with a reflection. Project evidence is self-reported; use the final portfolio rubrics to seek an independent code review.

Your Java learning path

Work through these foundations in order, then bring them together in a project.

24 of 24 lessons · follow the stages in order

Start with a small example

Save this as Main.java, compile it with javac Main.java, then run java Main. The loop prints a learning goal for each topic.

public class Main {
    public static void main(String[] args) {
        String[] topics = {"Classes", "Collections", "Testing"};

        for (String topic : topics) {
            System.out.println("Learn " + topic);
        }
    }
}

Try it yourself

Move the printing logic into a method and call it with a second array of topics.

Put it into practice

Build a command-line task tracker

Use objects and collections to organize everyday tasks.

  1. Create a Task class with a title and completion state.
  2. Store tasks in a list and display them with numbered entries.
  3. Add commands to create and complete tasks.
  4. Save tasks to a file and test missing or invalid input.
Keep exploring

Find your next course

Choose a language, build on it with a framework, or explore AI and search.

Showing 6 of 17 courses