Try This 3-1 Start Building a Java Help System
Help.java
This project builds a simple help system that displays the syntax for the Java control statements. The program displays a menu containing the control statements and then waits for you to choose one. After one is chosen, the syntax of the statement is displayed. In this first version of the program, help is available for only the if and switch statements. The other control statements are added in subsequent projects.
1. Create a file called Help.java.
2. The program begins by displaying the following menu:
Help on:
1. if
2. switch
Choose one:
To accomplish this, you will use the statement sequence shown here:
3. Next, the program obtains the user’s selection by calling System.in.read( ) ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access