Java from Scratch

Learn Java from scratch — with every program compiled and checked

A hands-on Java course for complete beginners. You write real Java in the browser and it is compiled and tested for you — no JDK to install, no build files to fight. Short interactive lessons introduce each idea; coding challenges make it stick. By the end you know the language and the Collections Framework interviewers expect.

8chapters, 20 interactive lessons
60coding challenges, judged
100quick-check questions
java · your first program
public class Main {
    public static void main(String[] args) {
        System.out.println("Hello, Java!");
        for (int i = 1; i <= 5; i++) {
            System.out.println(i + " squared is " + i * i);
        }
    }
}

Why learn Java here

The language of the industry

Java runs a huge share of the back-ends you use every day, and it is standard at Amazon, most product companies and every service company. Learning it well opens a lot of doors.

Types that catch your mistakes

Java is statically typed, so the compiler flags many bugs before your program ever runs. The course leans into that — you learn to read compiler messages instead of fearing them.

The Collections Framework, taught properly

ArrayList, HashMap, HashSet, ArrayDeque — knowing which to reach for is half of real Java. A whole chapter is devoted to it, with the trade-offs made explicit.

The syllabus — 8 chapters, in order

Each chapter is a set of short interactive lessons, then coding challenges you submit to a real judge before moving on.

  1. 01Getting Started
  2. 02Decisions & Loops
  3. 03Arrays
  4. 04Methods & Sorting
  5. 05Working with Text
  6. 06Collections
  7. 07Classes & Objects
  8. 08Robust Java

What you can do by the end

  • Write and run Java — variables, types, and clean System.out output
  • Control flow with if/else, for and while loops
  • Work with arrays and the Collections Framework (ArrayList, HashMap, HashSet)
  • Write methods and sort with comparators
  • Design your own classes with fields, constructors and inheritance
  • Handle exceptions and use interfaces and generics

How the course works

Read a short lesson

One idea at a time, written for a beginner — with worked examples and quick-check questions, not a video to scrub through.

Write real Java

Every lesson ends in an in-browser editor. Nothing to install — you write Java and press run.

A real judge checks it

Your code is compiled and run against hidden tests, so you know it actually works instead of guessing.

Java from scratch — questions people ask

How do I learn Java from scratch?

Begin with the basics — printing, variables and types, loops — and write code at every step, then move up to arrays, the Collections Framework and object-oriented design. This course is that path: eight chapters of interactive lessons and coding challenges, each compiled and tested by a real judge.

Is this Java course free?

You can start for free with no card. A free account opens the interactive workspace and the first lessons; one membership then unlocks the whole Java course plus the Python, C++ and JavaScript courses and the full DSA course.

Do I need to install the JDK?

No. Your code is compiled and run for you in the browser, so there is nothing to set up — you write a class and press submit.

Which Java version is used?

A modern LTS Java. You will write standard, idiomatic Java that reads the way interviewers expect.

Is Java good for coding interviews?

Yes — it is one of the most common interview languages. After this course, the Data Structures & Algorithms course (also taught in Java) is included in the same membership and takes you the rest of the way.

Will I get a certificate?

Yes. Completing the course issues a certificate with a public verification link an employer can check.

Also included in your membership

One membership unlocks every course — switch between them whenever you like. Nothing here is sold separately.

Start Java today — free

A free account opens the workspace and the first lessons, no card. One membership then unlocks this course and every other — $49 a year (international price; the price for your region is shown at checkout).