File tree Expand file tree Collapse file tree 1 file changed +38
-0
lines changed
Section7ConditionalStatements Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ # Move to the script’s directory
4+ cd " $( dirname " $0 " ) "
5+
6+ while true ; do
7+ clear
8+ echo " =============================================================="
9+ echo " Java Tutorial Resources - Conditional Logic"
10+ echo " =============================================================="
11+ echo " 1. Open switch Statement Tutorial"
12+ echo " 2. Java Language Spec §4.6 - Type Erasure"
13+ echo " 3. Java Enums Tutorial (Object-Oriented Concepts)"
14+ echo " 4. Exit"
15+ echo
16+ read -p " Enter your choice [1-4]: " choice
17+
18+ case " $choice " in
19+ 1)
20+ open " https://docs.oracle.com/javase/tutorial/java/nutsandbolts/switch.html"
21+ ;;
22+ 2)
23+ open " https://docs.oracle.com/javase/specs/jls/se8/html/jls-4.html#jls-4.6"
24+ ;;
25+ 3)
26+ open " https://docs.oracle.com/javase/tutorial/java/javaOO/enum.html"
27+ ;;
28+ 4)
29+ echo " Goodbye!"
30+ break
31+ ;;
32+ * )
33+ echo
34+ echo " Invalid choice. Please select 1 to 4."
35+ read -p " Press Enter to continue..."
36+ ;;
37+ esac
38+ done
You can’t perform that action at this time.
0 commit comments