Create an account on Practice-It! at https://practiceit.cs.washington.edu/.
Practice-It is an online programming practice tool, developed and hosted by the University of Washington. Practice-It problems are assigned as classwork and/or homework for many lessons in the AP CS A curriculum.
Get a taste of how Practice-It works and practice your Java skills by completing the following problems from Building Java Programs, 4th edition (our textbook):