mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2025-04-27 15:43:58 +00:00
Add space to comment prior to switch string
+ Add space to comment (after //) prior to switch on string example
This commit is contained in:
parent
18b1c0c4d6
commit
bf7d33037f
@ -277,7 +277,7 @@ public class LearnJava {
|
|||||||
}
|
}
|
||||||
System.out.println("Switch Case Result: " + monthString);
|
System.out.println("Switch Case Result: " + monthString);
|
||||||
|
|
||||||
//Starting in Java 7 and above, switching Strings works like this:
|
// Starting in Java 7 and above, switching Strings works like this:
|
||||||
String myAnswer = "maybe";
|
String myAnswer = "maybe";
|
||||||
switch(myAnswer){
|
switch(myAnswer){
|
||||||
case "yes":
|
case "yes":
|
||||||
|
Loading…
Reference in New Issue
Block a user