-
Conditionals and Control Flow컴퓨터/Java 2019. 11. 21. 10:18
- 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
'컴퓨터 > Java' 카테고리의 다른 글
toString() (0) 2019.11.21 [Java 기본 02] Java file, java 프로그래밍 특징 및 작성법 (0) 2019.11.20 제네릭 (0) 2019.10.06 형변환 (0) 2019.10.06 Java.util.Arrays 클래스 (0) 2019.10.06