일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- react
- Algorithm
- computer
- Pipelining
- python
- MacOS
- DS
- html
- Java
- for
- system
- CSS
- XML
- instruction
- while
- javascript
- control
- Linux
- DATAPATH
- data structure
- DoM
- php
- DB
- function
- web
- MIPS
- Class
- architecture
- mysql
- github
- Today
- Total
목록statement (3)
YYYEJI
do-while문이란? while문과 동일한데 do-while문은 조건이 true이든 false이든 최소한 한 번은 실행하고 조건문을 확인합니다. do { Action_code; } while (Boolean_Expression) public static void main(String[] args) { String month[] = {"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}; int i = 0; do { System.out.println(month[i]); i++; } while (month[i]!="January"); } whi..
for-each문이란? 객체의 값을 하나씩 가져와서 어떤 행동을 수행하는 statement입니다. for (type variable: iterate_list) { Action_code } iterate_list는 객체입니다. 객체에서 하나씩 값을 가져와서 variable에 넣습니다. 객체 안에 값이 더 이상 존재하지 않을 때 for문이 종료됩니다. for-each문을 사용하면 코드가 줄어들면서 가독성이 증가하게 됩니다. public static void main(String[] args) { String month[] = {"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "Nov..