Programming Language Java Control Flow Question #2153
Single Choice Not Set

QWhich option, inserted at line 4, produces the output 12?
1. public class Test{
2.       public static void main(String [] args){
3.             int x = 0;
4.             // insert code here
5.             do{ } while(x++ < y);
6.             System.out.println(x);
7.       }
8. }

ID: #2153 Java Control Flow 4,721 views
Question Info
#2153Q ID
Not SetDifficulty
Java Control FlowTopic

Choose the Best Option

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

  • A int y = x;
  • B int y = 10;
  • C int y = 11;
  • D int y = 12;
Correct Answer

Explanation

int y = 11;

Share This Question

Challenge a friend or share with your study group.