{ }
JavaEXERCISES

Get comfortable with Java.
One hands-on lesson at a time.

Short, interactive exercises help you understand the tools
and remember how to use them.

Start learning for free
  • Your first Java method
  • Variables & conditions
  • Loops & arrays
  • Classes & collections
  • Practical coding projects
Learn in your browser Check your actual work Practise until it sticks

Build the skill by using it.

Write a few lines, run real Java, and understand what your code actually does.

You edit code in your browser and run it through a real compiler. Tests compare expected and actual results, so a mistake gives you something concrete to investigate and fix.

1

Learn one idea

A short explanation and a worked example show you what the tool does and why it matters.

2

Do the work

Follow a guided task inside the practice workspace. Check the result and correct mistakes while the idea is fresh.

3

Try it yourself

Apply the skill to a different situation. Return for independent practice when you need a refresher.

From your first step to a complete workflow.

Begin with inputs and return values. Build toward loops, classes, collections, exceptions and projects that bring several ideas together.

  1. 01

    Start here

    Your first Java method · Return a text message · Store and update a value

  2. 02

    Values & calculations

    Calculate a line total · Keep the fractional part · Use a boolean condition

  3. 03

    Text & strings

    Combine text and values · Compare string contents · Read characters and substrings

  4. 04

    Decisions

    Choose between two outcomes · Combine boolean rules · Order several branches

  5. 05

    Loops & arrays

    Repeat a calculation with for · Repeat until a condition changes · Add values with a loop

  6. 06

    Reusable methods & algorithms

    Debug an array boundary · Handle missing array entries · Combine small methods

  7. 07

    Objects & records

    Give an object its own state · Protect an object’s rules · Separate class behavior from object state

  8. 08

    Interfaces & generic types

    Implement an interface contract · Override inherited behavior · Compose an object from another object

  9. 09

    Collections

    Count distinct values with a set · Look up a value by key · Count repeated keys

  10. 10

    Errors & input

    Handle an expected exception · Reject invalid inputs explicitly · Parse text with a fallback

  11. 11

    Streams & lambdas

    Pass behavior with a lambda · Filter and sum with streams · Transform stream elements

  12. 12

    Projects & review

    Build a validated revenue summary · Project: clean a contact import · Project: apply stock movements

Explore the full learning path

Put the pieces together.

Workplace projects combine the skills you have practised into a complete task. Work through the scenario, then check the finished result.

See all projects

Your first Java skill starts here.

Open the first lesson. Learn one idea. Try it right away.

Start learning for free First 3 lessons free. Your progress is saved in this browser.