-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHelp.java
More file actions
24 lines (23 loc) · 935 Bytes
/
Copy pathHelp.java
File metadata and controls
24 lines (23 loc) · 935 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
public class Help {
public static void main(String[] args) throws java.io.IOException {
System.out.println("Help on: ");
System.out.println(" 1. if");
System.out.println(" 2. switch");
System.out.print("Choose one: ");
int input = System.in.read();
switch (input) {
case 1:
System.out.println("The if:");
System.out.println(" if(condition) statement");
System.out.println(" else statement");
case 2:
System.out.println("The switch:");
System.out.println("switch(expression) {");
System.out.println(" case constant:");
System.out.println(" statement sequence");
System.out.println(" break;");
System.out.println(" // ...");
System.out.println("}");
}
}
}