컴퓨터/Java
Conditionals and Control Flow
수제녹차
2019. 11. 21. 10:18
728x90
반응형
- If a conditional is brief we can omit the curly braces entirely;
if (true) System.out.println("Brevity is the soul of wit");
- switch statement
String course = "History";
switch (course) {
case "Algebra" :
break;
case "Biology":
break;
default:
System.out.println("Course not found");
}
출처 : codecademy
반응형