일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- 비동기
- 코드스테이츠
- 컴퓨터공학
- Zerobase
- node.js
- 테스트코드
- execution context
- 운영체제
- JavaScript
- 파이썬 알고리즘 인터뷰
- algorithm
- 파이썬
- Operating System
- java
- 알고리즘
- python algorithm
- codestates
- context switching
- useState
- 글또
- 개발공부
- react 기초
- Computer Science
- OS
- Python
- REACT
- 자료구조
- 자바스크립트
- 자바
- 프로그래머스
Archives
- Today
- Total
목록자바 Switch case (1)
Back to the Basics

Java & SpringBoot-Switch-Expression비교 Switch-case 문은 비교 조건이 특정 값이나 문자열인 경우 사용한다. 자바14부터 break문을 사용하지 않아도 되고 조금 더 간결하게 변경되었다. 기존의 Switch-Case문 break문을 사용하여 case가 끝나면 switch 문을 나오게 해야한다. 비슷한 case의 경우 case 1: case 3: case:7 ...과 같이 작성이 가능하다. public class SwitchCaseTest { public static void main(String[] args) { int month = 10; int day; switch(month){ case 1: case 3: case 5: case 7: case 8: case 10:..
Programming Languages/JAVA
2022. 1. 11. 13:49