1
0
mirror of https://github.com/adambard/learnxinyminutes-docs.git synced 2025-08-09 08:16:58 +02: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:
Cameron Schermerhorn
2015-10-09 08:14:11 -04:00
parent 18b1c0c4d6
commit bf7d33037f

View File

@@ -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":