Practice Problems
3 problems
Tip: Work through each problem without looking at the solution. Use the
tests to check your logic, not just your output.
Code Editor
Java 17 (AP style)
Select a problem
–
Welcome 👋
Choose a problem on the left. You’ll see the prompt, starter code, and example tests.
Write your solution in the editor below, then click Run Code to send it to your Java runner.
Teacher note: This page expects a POST endpoint at
/api/java/run.
Wire it up to your favorite sandbox or judge.
1
Use
Tab to indent. Focus on readable code: good names,
clear logic, and correct edge cases.
Output & Tests
Feedback zone
Console
no runs yet
// Output from your program will appear here.
Sample tests
Select a problem to see the AP-style test cases.