There are many ways to test your code. The most formal way is to use JUnit testing facilities, which is covered in a separate module: Unit Testing with JUnit in DrJava (Section 7.2). For simple tests, you can test your code by directly interacting with it in the Interactions pane.
Available under Creative Commons-ShareAlike 4.0 International License. Download for free at http://email@example.com