You need to write another line of code after your do/wile loop and use console.printf to format that string that is given in the instructions. Something like this: Java console.printf("Because you said %s, you passed the test", response); Answer from Vladut Astalos on teamtreehouse.com
🌐
w3resource
w3resource.com › java-exercises
Java programming Exercises, Practice, Solution - w3resource
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.
🌐
W3Schools
w3schools.com › java › java_exercises.asp
Java Exercises
The exercises are a mix of "multiple choice" and "fill in the blanks" questions. There are between 3 and 9 questions in each category. The answer can be found in the corresponding tutorial chapter.
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. Any suggestions? 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
Your opinion on coding exercises in interviews

How are they useful in evaluating a candidate for a job that requires solving business problems writing clean code?

That's not the goal of these kinds of assignments. They are simple filters to weed out people who claim they're programmers but aren't. You would not believe how common it is to have applicants who haven't written a line of code apply to jobs for senior Java devs.

More on reddit.com
🌐 r/java
96
43
August 12, 2015
Java 8 exercises
https://b-ok.asia/book/5269696/f28ecd This is a book for coding problems. Enjoy :) More on reddit.com
🌐 r/learnjava
9
35
June 3, 2020
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 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
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
🌐
Codecademy
codecademy.com › learn › learn-java
Java Tutorial: Learn Java Programming | Codecademy
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. Why? Practicing computing integer values with Java's arithmetic operators will help you with a wide, wide range of Java tasks in the future.
Rating: 4.4 ​ - ​ 10.5K votes
Find elsewhere
🌐
Great Learning
mygreatlearning.com › blog › java exercises
Java Exercises
September 4, 2025 - Work through 90 Java practice programs, coding questions, and online exercises to improve your programming skills.
🌐
Medium
mohamedsaidibrahim.medium.com › 15-must-know-java-coding-exercises-for-interviews-and-practice-456ae1fb34cf
💻 15 Must-Know Java Coding Exercises for Interviews and Practice | by Mohamed Said Ibrahim | Medium
June 16, 2025 - This guide covers 15 essential Java exercises, complete with explanations and code snippets, ranging from strings and arrays to custom exceptions and recursion.
🌐
Coderanch
coderanch.com › t › 593430 › java › Java-exercises
Looking for Java exercises (Beginning Java forum at Coderanch)
September 24, 2012 - Hi, You can find exercices for beginners at javaperspective.com. Read the entire beginner section if you want a good grasp on Java basics. I Hope this helps. ... Welcome to the Ranch I looked at the first exercise there, and I am afraid I was not impressed.
🌐
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.

🌐
CodeChef
codechef.com › practice › java
Practice Java
Complete your Java coding practice with our online Java practice course on CodeChef. Solve over 180 coding problems and challenges to get better at Java.
🌐
GeeksforGeeks
geeksforgeeks.org › java › java-exercises
Java Exercises - Basic to Advanced Java Practice Programs with Solutions - GeeksforGeeks
October 9, 2025 - This Java exercise collection is designed to deepen your understanding of Java and refine your coding skills.
🌐
Codédex
codedex.io › codédex › java
Codédex | Learn Java
Learn Java with this free, beginner-friendly course. Master object-oriented programming and data structures to build efficient, scalable applications. Start today!
🌐
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.
🌐
Programiz
programiz.com › java-programming › examples
Java Examples | Programiz
The best way to learn Java programming is by practicing examples. The page contains examples on basic concepts of Java.
🌐
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.
🌐
DigitalOcean
digitalocean.com › community › tutorials › java-programming-interview-questions
Top Java Coding Interview Questions (With Answers) | DigitalOcean
April 17, 2025 - However, if you want to sort an array of objects, then the object must implement the Comparable interface. If you want to specify the sorting criteria, then you can pass the Comparator for the sorting logic. Learn more about Comparable and Comparator in Java.
🌐
NTU
www3.ntu.edu.sg › home › ehchua › programming › java › J3f_OOPExercises.html
OOP Exercises - Java Programming Tutorial
A class called MyCircle, which models a circle with a center and a radius, is designed as shown in the class diagram. The MyCircle class uses a MyPoint instance (written in the earlier exercise) as its center.
🌐
CodeGym
codegym.cc › java-coding-practice
Java Coding Practice | Improve Your Skills with Free Java Exercises
We’ve prepared a collection of Java exercises that will help you grasp the syntax of Java language and some core programming topics. In addition, you’ll find useful links to articles that cover the theory of Java.
🌐
HackerRank
hackerrank.com › domains › java
Solve Java Code Challenges
Java · Solve Challenge · Solve Challenge · Solve Challenge · Solve Challenge · Solve Challenge · Solve Challenge · Solve Challenge · Solve Challenge · Solve Challenge · Solve Challenge · Status · Solved · Unsolved · Skills · Java (Basic) Java (Intermediate) Problem Solving (Intermediate) Difficulty ·