Programming Language › Java Control Flow › Question #2152
Single Choice Not Set

QWhat 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);
      }
}

ID: #2152 Java Control Flow 761 views
Question Info
#2152Q ID
Not SetDifficulty
Java Control FlowTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A 1 ✔ ✖
  • B 2 ✔ ✖
  • C -1 ✔ ✖
Correct Answer

Explanation

0

Share This Question

Challenge a friend or share with your study group.