Java course 27 from scratch
Banks, marketplaces and Android apps run on Java, and the market has needed Java developers for 30 years now. Here you learn the language by doing: a lecture, straight to a task, and the AI mentor goes through your mistakes. The updated curriculum adds Spring Boot and 7 projects.
first level free, no cardnothing to installlearn at your own pace
Outcome
What the Java course gives you
For 30 years Java has run the back end of banks, marketplaces and large services. Systems like these live for years, so there's always work for people who can write and maintain them.
A profession that never goes out of style
Java developers are wanted by banks, fintech, retail and IT integrators. A junior starts on a decent salary, and it grows with experience. How much they pay in different countries, see below.
From your first command to your own projects
First simple commands, then classes, collections and files. Then real tasks: a web service on Spring Boot, a Minecraft plugin, a program that edits video on its own. Every module ends with a project you can run and show.
Other languages come easier after Java
Strict types and OOP teach you to write carefully. After Java, Kotlin and C# come easily: the principles are the same, only the syntax changes. Python and JavaScript will be easier too.
Java version
You learn Java the way it's written in 2026
You learn the language basics on the latest Java 27, released in September 2026. You build the Spring Boot projects and the Minecraft plugin on Java 25: the long-term support version, LTS. Oracle updates it until 2030, and extended support runs until 2033, so companies are launching new systems on it right now. That way you know both the new syntax and the version the frameworks run on.
public class Main {
public static void main(String[] args) {
System.out.println("Hello, Java!");
}
} Five lines and five unfamiliar words. Beginners had to memorize them without any explanation.
void main() {
System.out.println("Hello, Java!");
} Three lines. You'll get to classes, static and arguments later, when you need them. This change, JEP 512, was made specifically for those who are just learning.
You'll also learn the long form with public static void main on the first levels: it shows up in task templates and in code on Java 8 and 11.
Who it's for
Who the Java course suits
No programming experience needed: the course starts with your first command.
But better to be honest from the start: it fits some people perfectly, and others should pick another format.
It suits you if
You have no experience and want to master the language that banks, marketplaces and large services run on
You're changing careers and ready to study an hour a day without a rigid schedule
You once learned Java 8 or 11 and want to catch up: records, the Stream API, Spring Boot and working with an AI agent
You know Python or JavaScript and want a second, strictly typed language
You study Java at university or college, and the classes don't give you enough practice
You'd rather not fear AI at work, but know how to give it tasks and check its code
More than 2 million people have learned with CodeGym since 2012. The course starts from your very first command.
Another format is better if
You already work as a Java developer: the basics will bore you, go straight to Spring Foundation
You need live classes, a mentor and help finding a job: see Java University at CodeGym University
You're looking for a course where you can watch and not write code. Here you'll have to write it yourself, 950-odd times
first level, no card
Maximum practice, no fluff
How learning works in the Java course
We asked people who gave up learning to program what stopped them. The two most common answers: no visible progress (21.5%) and a sudden jump in difficulty (21.1%). That's our research. So here you see the result after every task, and the difficulty grows step by step.
Your first task in five minutes
You sign up, read a short lecture and write code right in the browser, in the built-in WebIDE. Your first assignment: print “Being a coder is cool! 😎” to the screen.
2
3
void main() { System.out.println("Being a coder is cool! 😎"); }
Made a mistake? You'll see exactly what's wrong
After “Verify” you see which requirement of the task isn't met. The AI mentor will point you where to look but leave the solution to you: that's how the skill takes shape. It answers any time, even at two in the morning.

- The program prints text to the screen
- The
printlnmethod is used - The text matches the task
Compare your line with the task: a space is missing after the word “coder”.
From level 5 you work in IntelliJ IDEA
Just like in a real team. The CodeGym plugin brings the course's tasks into the IDE, and the checks stay the same. The free version of IntelliJ IDEA is enough for learning, and the level 5 lectures will help you install it.
Comment out the unnecessary lines of code so that the screen shows:
2 plus 3 equals 5Note: you can't comment out the lines that declare variables.
void main() { int a = 3; int b = 2; IO.print("two "); IO.print(b); IO.print(" plus "); IO.print(" minus "); IO.print(a); IO.print(" equals "); IO.print(a + b); }
This cycle repeats 950-odd times
Curriculum The 2026 curriculum
Java course curriculum: 7 modules
From your first command to a Spring Boot service, a Minecraft plugin and a program that edits video. Every module ends with a project, and every topic is reinforced with checked tasks. All modules are open at once, and each one says up front what's best to finish before it.
- Commands, output and first variables
- Numbers, strings and keyboard input
- The conditional operator
- Loops
- IntelliJ IDEA and the CodeGym plugin: your first project
- Arrays
- Floating-point numbers and char
- Methods
- Strings
- Constants, enum and switch
- Exceptions
- Project “Crack the Safe”
- Bonus “Live Data”: a picture to a file and the ISS position via an API
- Classes and constructors
- Encapsulation
- Object composition
- Inheritance and hierarchies
- Polymorphism and overloading
- Abstract classes
- Interfaces
- Annotations
- Record classes
- A first look at List and Map
- Project “Heroes Arena”
- Collections and generics
- Lambda expressions and functional interfaces
- Working with collections
- Comparing objects and java.time dates
- Stream API basics
- Grouping and aggregation
- Working with files
- JSON and Jackson
- Project “Movie Night”
- Getting to know Claude Code
- The Gradle build: the agent sets up the project
- Skills and plugins: PDF, PowerPoint and a report button
- Git: commit, diff and rolling back the agent's edits
- MCP and Playwright: checking in the browser
- Context, plan mode and helpers
- Branches, worktrees and parallel helpers
- CLAUDE.md, /clear and Context7
- A task template, a contract and JUnit
- JUnit tests and reviewing the agent's code
- Project “Meme Generator”
- Your own HTTP server in Java
- A Gradle project: a task server
- Spring Boot in the same project
- Spring: objects and dependencies
- Spring MVC
- REST API and JSON
- Validation and error handling
- Spring AI: connecting a language model
- Tool Calling: AI calls Java methods
- An AI assistant's memory
- Project “My AI Secretary”
- Bonus: your own MCP server in Java
- A Paper server and a plugin project on Gradle
- Your first plugin: build, install and logs
- Commands
- Events
- Particles and sounds
- Players
- Blocks and the world
- Mobs
- Items and inventory
- Crafting and recipes
- Timers and cooldowns
- Project “Lightning Staff”
- Java and FFmpeg: first steps
- Video editing: cutting and joining
- Speech recognition
- AI Video Director: the model picks the moments
- AI editing to a plan
- Vertical format for Shorts
- AI subtitles
- Music and effects
- Project “AI Shorts Factory”
first level, no card
Practice
What you'll write in the Java course: 7 projects
Every module ends with a finished program you can run and show. The projects don't depend on each other, and AI's share grows from module to module: first you write the code yourself, then you learn to give tasks to the agent and accept its work.
Crack the Safe
Your first finished Java program is a console game: it picks a secret code of digits, and after each of 10 attempts it tells you how many digits you guessed and how many are in the right place. All of Java syntax comes together here: loops, arrays, methods and exception handling. Along the way you get into the habit of thinking about bad input before the user types it.
Heroes Arena
A warrior, a mage and an archer fight until only one is left, and at the end you send your own fighter into the arena — without changing a single line of the combat code. This is what OOP in Java looks like in practice: abstract classes, interfaces and polymorphism do the work for you. Large projects rely on the same technique to add new things without breaking the old ones.
Movie Night
A small back end in the console: the program reads a movie catalog from JSON, picks a film for a request like “a drama rated 7.5 or higher, no longer than 130 minutes” and remembers your favorites between runs. You'll reinforce collections, the Stream API, files and Jackson on a task every Java developer meets: read the data, filter it, save it.
Meme Generator
The Claude Code AI agent writes the captioned memes and the web gallery, but you're responsible for the result. You write the assignment and the JUnit tests, approve the plan, review the edits in Git and decide what goes into the project. Any team that writes code together with AI needs this skill: you can only accept work if you know how to check it.
My AI Secretary
You type “add a task to buy bread tomorrow” in the chat — and the task appears in the list. Inside is a real web service on Spring Boot: a REST API, validation and a language model through Spring AI that calls Java methods on its own and remembers the conversation. You write the tests and the check scenarios, Claude Code writes the service's code on your instructions. A good portfolio project: it shows how a modern back end is built.
Lightning Staff
Why would a Java developer need a staff that strikes lightning wherever the player is looking? A Minecraft plugin on the Paper API means working with a big library someone else wrote, as in real projects: documentation, a Gradle build into a JAR, installing it on a server. Claude Code writes the code, and in CLAUDE.md you forbid it outdated calls and check that it sticks to those rules.
AI Shorts Factory
The project's main lesson: you can't take a language model's answer on trust. The Java program recognizes speech in a long video, asks the model to pick the best moments, checks every interval and only then runs FFmpeg. The output is a vertical 9:16 clip with subtitles, a title and music that you can watch and show your friends.
You'll master:
AI in the course
Claude Code is part of the Java course
AI agents already write code in teams, and a junior needs to know how to work with them: set the task, check the result and take responsibility for it. In the course you learn this on a real agent, Claude Code.
First on your own
You write the basics with your own hands. The AI mentor in a task explains the error and points you where to look, but leaves the solution to you. Without this foundation you can't check someone else's code.
You learn to lead the agent
You describe what the program should do and write tests: short checks that show whether it works. Claude Code writes the code, and you check the result and decide whether to accept its work. That's how you learn to lead AI rather than take its word for it.
You work as a pair
You build the Spring Boot service, the Minecraft plugin and the video pipeline together with the agent, as in a team. And in two projects AI also works inside your program: it runs the secretary's chat and picks the moments for the clip.
Choosing a course
Java 27 course or Java 25 course?
The 2026 curriculum has replaced the Java 25 course. Both start from scratch and are built on checked tasks. The difference is where the course takes you after the language basics.
| Java 27 course | Java 25 course | |
|---|---|---|
| Language version | The basics on Java 27, the projects on Java 25 LTS | Java 25 LTS, new topics marked with their version |
| Scope | 7 modules, 77 levels, 400+ lectures, 950+ tasks | 65 levels, 325+ lectures, 800+ tasks |
| After the basics | Working with an AI agent, Spring Boot and Spring AI, Minecraft plugins, video with AI | Files and serialization, multithreading and Virtual Threads, reflection, memory and garbage collection |
| Projects | 7 finished projects, one per module | Tasks and mini-projects |
| AI | The AI mentor gives hints in tasks, and the Claude Code AI agent is included in the course price | The AI mentor gives hints in tasks |
| Best for | Those starting now who want to build projects with AI and Spring right away | Those already taking it, and those who care more about the depth of Java Core: threads and how the JVM works |
Starting from scratch today?Take the 2026 course: it's the one the CodeGym team recommends to beginners.Already taking the Java 25 course?It stays open, and your progress is saved: continue the Java 25 course.
How access works
The first level is free. Then it's up to you
The first level is fully open, no card needed: that's enough to see whether it's for you. You start paying only once you're sure the format suits you.
First level
- 7 lectures, 9 tasks and a test
- Write and check code in the browser
- AI mentor hints
- Sign up in a minute
The whole Java course
- All 77 levels, 400+ lectures and 950+ tasks
- WebIDE in the browser and a plugin for IntelliJ IDEA
- The AI mentor and the Help section
- 7 projects and Claude Code for working with AI
- Cancel any time, progress is kept
At online schools, learning Java usually costs several times more and is paid for the whole year up front.
Here you pay month by month and can stop at any time.
And if you also need SQL, Docker and other languages, there's the ALL IN ONE subscription for all courses.
Want to reach your first job as a Java developer together with a mentor? CodeGym University has the Java University program: 12 months with mentors, live code reviews and career support until your first offer.
Explore the University
CodeGym learners
CodeGym has taught programming since 2012
More than 2 million people already learn with CodeGym. Most of its courses start from scratch, like this one.
since 2012
from 1,500+ reviews
recommend CodeGym
Reviews
What learners say about the Java course
Quotes from learners' reviews, the long ones shortened.
reviews
Java in 2026
Why learn Java in 2026 and how much Java developers are paid
A Java developer writes the back end: everything that happens after you tap “Pay” in a banking app or “Buy” on a marketplace. Java is No. 4 in the TIOBE index, it's used by 29.4% of developers according to the Stack Overflow survey, and it's also the language of Android apps and big data processing systems.
The language is over 30 years old, and it isn't leaving the stage. Banks and large services keep writing new systems in Java because it's reliable, fast and handles load well.
What you'll do
How much Java developers earn
median, USD a month before taxCan you really learn Java from scratch
Yes, even though Java is stricter than Python. You have to declare types, and the compiler won't run the program while it has an error. For a beginner that rather helps: you learn about many slips right away, not a week later. And in the current version of the language, first programs have become shorter too. School maths and regularity are enough: an hour of practice every day gives you more than a weekend marathon.
Sources: BLS, Glassdoor, Stack Overflow Survey 2025 · Data updated: September–November 2026
Sources: ITJobsWatch (UK), Glassdoor (DE, NL), StepStone · Data updated: September–November 2026
Sources: Just Join IT Salary Report 2026 (PL), Levels.fyi (CZ, EE), Glassdoor · Data updated: September–November 2026
Sources: PayScale India, Indeed India, Stack Overflow Survey 2025 · Data updated: September–November 2026
Sources: Stack Overflow Survey 2025, PayScale (BR), PayScale (MX), Robert Half (BR), Indeed (BR) · Data updated: September–November 2026
Sources: Arc.dev Remote Salary 2026, Stack Overflow Survey 2025 · Data updated: September–November 2026
FAQ
Questions about Java and the course
Short answers to what people ask most before they start.
Java is a programming language used to write the back end of applications: everything that happens after you press “Pay” or “Send”. Banking systems, marketplaces, Android apps and data processing services run on it. Java code runs on any system that has a JVM, so the same program works on both Windows and Linux.
No, they're different languages with similar names. JavaScript mostly runs in the browser and handles what happens on a web page. Java more often runs on the server: it processes payments, orders and data. The syntax looks alike in places, but the languages work differently.
Python is easier at the start: fewer rules, shorter code. Java is stricter: you declare types, and errors show up before you even run the program. But after Java it's easier to move to other languages, and there are plenty of jobs for Java developers in back end, banking and large companies. If your goal is server-side work at a big company, Java is a good choice. If you want to automate routine faster or get into data analysis, start with the Python course.
Yes. The course starts with your first command that prints to the screen, and the first levels run right in the browser. You need to know how to use a computer and set aside time for practice. The first level is free: in one evening you'll see whether it's for you.
With an hour or an hour and a half of practice a day, people learn the language basics in two or three months. At that pace the whole Java course takes about a year. Getting to a first job usually takes 9 to 12 months: SQL, Spring and your own projects are added to Java Core.
With practice, not with a thick book and setting up a development environment. Start with the basics: variables, conditions, loops and methods, and after each topic solve tasks right away, because Java sticks through your hands. It's most convenient to do this in the browser, where there's nothing to install, for example on the free first level of this course. Install IntelliJ IDEA a bit later, once simple programs are working out.
C++. In it you manage memory by hand, and it's easy to get a bug that's hard to find. In Java the garbage collector frees memory, and the compiler catches many errors before the program even runs. That's why Java is often chosen as a first serious language.
The basics in both courses are similar, and then the paths part. After collections and files, the 2026 course teaches you to work with the Claude Code AI agent and to write services on Spring Boot and Spring AI, Minecraft plugins and video editing programs, and every module has its own project. The Java 25 course goes deeper into Java Core: multithreading, Virtual Threads, reflection and garbage collection. It stays open, and your progress in it is saved. The CodeGym team recommends the 2026 course to beginners.
The classic course with the story about Amigo the robot also stays open, together with your progress. If you're already taking it, you can finish it at your own pace. If you're just starting, take the 2026 course: it's written for modern Java.
Claude Code is an AI agent for programming: it reads the project, writes code, runs commands and works with Git. In the course it's already connected and runs on CodeGym learning models: you don't need a subscription or keys of your own, the agent is included in the course price. You start working with it in module 4, once you've covered the language basics.
No. The Paper server your plugin runs on is free, and you can check the plugin through the server console and tests. You need the game itself only if you want to see your lightning staff in action. It's bought separately.
The first level is free, with no card: 7 lectures, 9 tasks and a test. The Java games section is also open without a subscription. Full access comes with a subscription from $30 a month, and Claude Code for the AI modules is included in that price. There's also the ALL IN ONE subscription: it opens all CodeGym programming courses at once, including SQL and Docker.
Not to start: the first four levels run in the built-in WebIDE. At level 5 the course will help you install Java and IntelliJ IDEA with the CodeGym plugin, so you can solve tasks in a real development environment. Later in the course you'll install Claude Code, a Minecraft server and FFmpeg for video, and each installation has its own lecture.
The course gives you the Java Core that every junior interview tests, your first steps in Spring Boot and 7 portfolio projects. For a job, people add SQL and deeper Spring to that. If you need a mentor and help finding a job, there's Java University at CodeGym University: 12 months with mentors, live code reviews and career support until your first offer.
Yes. AI writes routine code quickly, but someone has to understand what it did, find the bug and be responsible for the system that payments go through. That's exactly what Java projects at banks and large services value. That's why in the course you write the basics yourself, and then learn to work with the Claude Code AI agent: give it a task and check its code with tests.
No. You choose the pace, and the course isn't tied to a schedule: an hour of practice a day is enough to move forward.
Yes, any time. Your progress is saved to your account: come back and continue from the same level.
Programmers are made, not born
They're made through practice. Open the first level of the Java course
and run your first program tonight.
first level free, no card