Examveda
Examveda

What will be the output?
public class Test{
      public static void main(String args[]){ 
            int i = 1;
            do{
                  i--;
            }while(i > 2);
            System.out.println(i);
      }
}

A. 1

B. 2

C. -1

D. 0

E. None of these

Answer: Option D


This Question Belongs to Java Program >> Flow Control

Join The Discussion

Related Questions on Flow Control