Debugging with the debugger supplied via jdb or any number of IDE's available. You can step through the code to evaluate variable values. In addition, using assertions or writing Test cases help you...