Skip to content

Commit f963712

Browse files
committed
Add macOS Bash scripts to launch Java documentation and tutorial links.
Signed-off-by: Somesh diwan <[email protected]>
1 parent 7b5a11a commit f963712

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
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

0 commit comments

Comments
 (0)