We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ab6a177 commit 6820b7bCopy full SHA for 6820b7b
conditionals_And_Loops/Switch_Statement.java
@@ -0,0 +1,43 @@
1
+package conditionals_And_Loops;
2
+
3
+public class Switch_Statement {
4
5
+ public static void main(String[] args) {
6
7
+ int age;
8
+ age = 3;
9
10
+ switch (age){
11
+ case 3:
12
+ System.out.println("You can crawl");
13
+ break;
14
15
+ /*
16
+ * you must have
17
+ * as many cases
18
+ * as the variable can be
19
+ * instead of checking every
20
+ * value with if statements
21
+ */
22
23
24
+ default:
25
+ System.out.println("I dont know how old you are");
26
+ }
27
28
29
30
31
32
33
34
35
+ * NOT SURE
36
+ * I WILL USE
37
+ * A SWITCH STATEMENT
38
39
40
41
42
43
+}
0 commit comments