fork download
  1.  
  2. /* Name of the class has to be "Main" only if the class is public. */
  3. class Ideone
  4. {
  5. public static void main (String[] args) throws java.lang.Exception
  6. {
  7. int i = 0; //while에서 사용할 변수를 선언
  8.  
  9. while(i < 10){
  10. System.out.println(i);
  11. i++; //조건문을 원하는 만큼만 반복하고 빠져나가기 위한 부분
  12. }
  13. }
  14. }
Success #stdin #stdout 0.06s 32364KB
stdin
Standard input is empty
stdout
0
1
2
3
4
5
6
7
8
9