Try This 3-3 Finish the Java Help System
Help3.java
This project puts the finishing touches on the Java help system that was created in the previous projects. This version adds the syntax for break and continue. It also allows the user to request the syntax for more than one statement. It does this by adding an outer loop that runs until the user enters q as a menu selection.
1. Copy Help2.java to a new file called Help3.java.
2. Surround all of the program code with an infinite for loop. Break out of this loop, using break, when a letter q is entered. Since this loop surrounds all of the program code, breaking out of this loop causes the program to terminate.
3. Change the menu loop as shown here:
Notice that this loop now includes the break ...
Get Java, A Beginner's Guide, 5th Edition, 5th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.