This version adds break and continue syntax.
It also allows the user to request the syntax of more than one statement. It does this by adding an external loop that runs until the user enters q as a menu selection.
Copy Help2.java into a new file called Help3.java
Include all program code in an infinite for loop. Exit this loop, using break, when a letter q is inserted. Since the loop encompasses all of the program's code, exiting it causes the program to terminate.
Change the menu loop as shown here:
Note that this loop now includes break and continue statements. It also accepts the letter q as a valid option.
Disclaimer: All resources provided are partly from the Internet. If there is any infringement of your copyright or other rights and interests, please explain the detailed reasons and provide proof of copyright or rights and interests and then send it to the email: [email protected] We will handle it for you as soon as possible.
Copyright© 2022 湘ICP备2022001581号-3