Notice
Recent Posts
Recent Comments
Link
«   2024/07   »
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
more
Archives
Today
Total
관리 메뉴

WON.dev

chapter04 : do_while 본문

JAVA/chapter04_control

chapter04 : do_while

GAWON 2023. 5. 25. 16:42
package org.joonzis.ex;

public class Ex04_do_while {
	public static void main(String[] args) {
		/*
		 * 1. 형식
		 * 		do{
		 * 		 	반복실행문;
		 * 		} while (조건식);
		 * 
		 * 2. 특징
		 * 	1) 반드시 한 번은 실행되는 반복문이다.
		 *  2) 나머지 특징은 while 문이다.
		 */
		
		// 0~9까지 숫자 화면에 출력
		
		int num = 0;
		do {
			System.out.println(num);
			num++;
		} while (num < 10);
		
		
		
		
		
	}
}

'JAVA > chapter04_control' 카테고리의 다른 글

chapter06 : break  (0) 2023.05.25
chapter05 : for  (0) 2023.05.25
chapter03 : while  (0) 2023.05.25
chapter02 : switch  (0) 2023.05.25
chapter01 : if  (0) 2023.05.25