Practice Java Online with Interactive Exercises
Choose from 265 Java exercises across 10 structured topics. Each canonical problem page includes a real scenario, starter code, expected output, test cases, and hints.
Choose a Java practice topic
- Practice Core Java Basics — 26 exercises
- Practice Control Flow — 24 exercises
- Practice Arrays — 22 exercises
- Practice Strings — 19 exercises
- Practice OOP Basics — 24 exercises
- Practice Inheritance — 20 exercises
- Practice Collections — 22 exercises
- Practice Exception Handling — 24 exercises
- Practice File I/O — 24 exercises
- Practice Data Structures & Algorithms — 60 exercises
How the practice lab works
- Open a topic and select an exercise.
- Review the problem, expected output, and hints.
- Write and run Java code in the interactive editor.
- Save bookmarks and progress locally in your browser.
Start the beginner Java track · Use the standalone Java compiler