Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
Tags
- MacOS
- while
- Class
- data structure
- control
- computer
- github
- DATAPATH
- Algorithm
- MIPS
- DB
- DS
- html
- react
- function
- javascript
- DoM
- mysql
- instruction
- for
- architecture
- CSS
- Linux
- php
- web
- python
- Pipelining
- Java
- XML
- system
Archives
- Today
- Total
목록Switch (1)
YYYEJI
[JAVA] Switch 문이란?
Swith문이란? 변수 값과 일치하는 case 값이 실행되는 조건 판단문입니다. 예제를 살펴보겠습니다. switch (variable) { case something1 : action1 break; case something2 : action2 break; case something3 : action3 break; default : action4 } variable 값에 일치하는 case가 action을 취하게 됩니다. 일치하는 something이 없다면 default로 넘어가고 switch문이 종료됩니다. public static void main(String[] args) { int month = 4; String m = ""; switch (month) { case 1 : m = "January";..
Java
2022. 12. 24. 18:14