How to End an Infinite Loop in BlueJ

How to End an Infinite Loop in BlueJ thumbnail
Use the debugger window to end infinite loops in BlueJ.

BlueJ is an open source IDE (integrated development environment) that utilizes the Java programming language. BlueJ is primarily used as an educational tool to teach object-oriented programming and application development. The program interface is far more simplistic than a full-scale IDE, and some basic program features are hidden away in sub-menus. When testing your project in BlueJ, you may run into an infinite loop. Loops will repeat themselves infinitely if the termination conditions of the loop are handled incorrectly. To return to your project and fix the code, you first need to stop your program and end the infinite loop.

Instructions

    • 1

      Click on "View" in the main tool bar at the top of the BlueJ application window.

    • 2

      Click "Show Debugger" in the "View" menu drop-down box.

    • 3

      Click the "Halt" button from within the debugger to stop the program and end the infinite loop.

Tips & Warnings

  • Press "Ctrl + D" on your keyboard to access the debugger quickly.

  • If your infinite loop includes user input, you will need to satisfy the input after ending the program with the "Halt" button. Once the user input is satisfied, the infinite loop will be stopped.

Related Searches:

References

Resources

  • Photo Credit Hemera Technologies/Photos.com/Getty Images

Comments

Related Ads

Featured