I recommend reading through the Sun's tutorials for code examples and practice in all areas of Java programming, especially the areas you wish to improve in.

Depending on how much of beginner examples you were looking for, check out CodingBat for some good beginner exercises. Project Euler is another good site, but depending on your skill level now, this may be too much, but it's worth trying anyways.

Most importantly, Its also worth noting that personal projects are a great way to start to learn a new language. I would also recommend starting a project that is benefical to you and get cracking right away, no time is better than the present!

Answer from Anthony Forloney on Stack Overflow
🌐
w3resource
w3resource.com › java-exercises
Java programming Exercises, Practice, Solution - w3resource
March 13, 2025 - This resource offers a total of 5356 Java Programming problems for practice. It includes 1129 main exercises, each accompanied by solutions, detailed explanations, and 4 to 5 related problems.
🌐
Exercism
exercism.org › tracks › java
Java on Exercism
Join Exercism’s Java Track for access to 155 exercises grouped into 26 Java Concepts, with automatic analysis of your code and personal mentoring, all 100% free.
Discussions

Exercises to improve my Java programming skills - Stack Overflow
I have learned basics of Java but want to practice more. I was looking via Google and couldn't find many beginner level problems that I can solve using Java. ... I'm a generic programmer. stil haven't thought about any specific areas so far. Any suggesstions?? ... @JayMayu try code-exercises.com... More on stackoverflow.com
🌐 stackoverflow.com
Looking for good Java exercises

Take a look at the MOOC Java Programming as it is a textual course with plenty graded practical exercises.

More on reddit.com
🌐 r/learnjava
11
28
September 15, 2020
Exercises in the Java language - Java - Code with Mosh Forum
Hello everyone, I start my way in java… Do you have a recommended site that presents questions in java I find myself learning but not being able to practice what I learn More on forum.codewithmosh.com
🌐 forum.codewithmosh.com
0
October 21, 2023
Where can I find a list of beginner java exercises?

There are lots. A popular one is www.codingbat.com

More on reddit.com
🌐 r/learnjava
8
15
September 11, 2014
People also ask

What is Java?
Java is an open-source, general-purpose programming language known for its versatility and stability. It's used for everything from building websites to operating systems and wearable devices. You can even find Java in outer space, running the Mars rover.
🌐
codecademy.com
codecademy.com › learn › learn-java
Java Tutorial: Learn Java Programming | Codecademy
What do I need to know before learning Java?
There aren't any prerequisites to learning Java, but it helps to have a solid understanding of programming fundamentals (which you can learn in our Code Foundations skill path).
🌐
codecademy.com
codecademy.com › learn › learn-java
Java Tutorial: Learn Java Programming | Codecademy
What does Java do?
A better question might be, "what can't Java do?" You'll find Java in the back end of websites and web apps, and it dominates the smartphone market as the primary language for Android development. It's also used to process big data and build desktop, game, and cloud-based applications — and many companies use it to build their own internal tools and software.
🌐
codecademy.com
codecademy.com › learn › learn-java
Java Tutorial: Learn Java Programming | Codecademy
🌐
GitHub
github.com › bobocode-projects › java-fundamentals-exercises
GitHub - bobocode-projects/java-fundamentals-exercises: Training Exercises that cover language basics, Algorithms, Data Structures, OOP, and Functional Programming
Training Exercises that cover language basics, Algorithms, Data Structures, OOP, and Functional Programming - bobocode-projects/java-fundamentals-exercises
Starred by 453 users
Forked by 536 users
Languages   Java
🌐
Codecademy
codecademy.com › learn › learn-java
Java Tutorial: Learn Java Programming | Codecademy
In this project, we're going to practice creating variables and printing. We're going to put your skills to the test by generating a story, Mad Libs style. ... It's time to build fluency with operators in Java. In this project, we're going to practice arithmetic in Java so you can hone your skills and feel confident taking them to the real world.
Rating: 4.4 ​ - ​ 10.5K votes
🌐
CodingBat
codingbat.com › java
CodingBat Java
CodingBat code practice · Welcome to Codingbat. See help for the latest. Java Example Solution Code · Java String Introduction (video) Java Substring v2 (video) Java String Equals and Loops · Java String indexOf and Parsing · Java If and Boolean Logic · If Boolean Logic Example Solution Code 1 (video) If Boolean Logic Example Solution Code 2 (video) Java For and While Loops ·
Find elsewhere
🌐
Codewars
codewars.com › collections › java-exercises-1
Java Coding Practice | Java Exercises | Java Programs For Practice | Codewars
Codewars is a community where you can learn and practice coding in Java. Solve coding exercises to improve your skills.
🌐
w3resource
w3resource.com › java-exercises › basic › index.php
Java Basic Programming Exercises - w3resource
April 1, 2025 - This resource features 750 Java Basic exercises, each complete with solutions and detailed explanations. Additionally, each exercise includes four related problems, providing a total of 150 problems for practice.
🌐
W3Schools
w3schools.com › java › java_exercises.asp
Java Exercises
Variables Print Variables Multiple Variables Identifiers Constants (Final) Real-Life Examples Java Data Types
🌐
Exercises Java
exercisesjava.com
Learn and Practice Java Free with Online Exercises
Master Java with the free hands-on programming course for all levels. Learn Java programming online with exercises for beginners and experts.
🌐
Programiz PRO
programiz.pro › course › practice-java-basics
Practice: Java Basics
Master the basics of Java programming by solving 60+ practice problems in real-time.
🌐
Reddit
reddit.com › r/learnjava › looking for good java exercises
r/learnjava on Reddit: Looking for good Java exercises
September 15, 2020 -

Hello all,

I am currently doing Mosh's Java course. I am in Section 2 ( OOP) . So far his tutorials are really good but unfortunately is quite light in terms of exercises.

Can anyone recommend me some good place to practice the concepts I learn each day?

I was looking for something like Angela's Python course where each day she does some mini exercises on the topic of the day ending with a bigger challenge that requires concepts from things learnt so far.

🌐
Sololearn
sololearn.com › en › Discuss › 445427 › java-practice-questions-and-exercises
Java Practice Questions and Exercises | Sololearn: Learn to code for FREE!
Hey everyone, I've recently finished the java course on sololearn and downloaded netbeans onto my laptop. I would now like to practice some java exercises. Does an
🌐
Great Learning
mygreatlearning.com › blog › java exercises
Java Practice Exercises
September 4, 2025 - Work through 90 Java practice programs, coding questions, and online exercises to improve your programming skills.
🌐
GeeksforGeeks
geeksforgeeks.org › java › java-exercises
Java Exercises - Basic to Advanced Java Practice Programs with Solutions - GeeksforGeeks
October 9, 2025 - Java Exercises - Basic to Advanced Java Practice Programs with Solutions · 5 min read · Java Quiz · 1 min read · Java Project Ideas For Beginners and Advanced · 15+ min read · Like · Improvement · Suggest changes · Suggest Changes · Help us improve.
🌐
Code-exercises
code-exercises.com
Java Programming Exercises with Solutions - Practice Online
Easy Sum of Two Numbers Sum Multiples of Three and Five Factorial Linear Search Reverse String Find Maximum Average Value (Java 8 Lambdas and Streams) Convert to Upper Case (Java 8 Lambdas and Streams) Nth Odd Element Number Of Tree Nodes Count Nodes in List Count Number of Leaf Nodes Binary ...
🌐
Javaforaliens
javaforaliens.com › files › jfa13-exe-1-20-E.pdf pdf
Exercises - Java for Aliens Landing Page
Already know Java? Sure? What about modules, lambdas, streams, intersection types, var, switch expressions, text blocks, annotation types, JLink and shebang files?
🌐
HackerRank
hackerrank.com › domains › java
Solve Java Code Challenges
Join over 28 million developers in solving code challenges on HackerRank, one of the best ways to prepare for programming interviews.
🌐
Code with Mosh
forum.codewithmosh.com › java
Exercises in the Java language - Java - Code with Mosh Forum
October 21, 2023 - Hello everyone, I start my way in java… Do you have a recommended site that presents questions in java I find myself learning but not being able to practice what I learn