Single Choice Not Set

QDetermine output:
class A{
        public static void main(String args[]){
	        int x;
 	        x = 10;
	        if(x == 10){
		        int y = 20;
		        System.out.print("x and y: "+ x + " " + y);
		        y = x*2;
	        }
	        y = 100;
	        System.out.print("x and y: " + x + " " + y);
        }
}

ID: #2007 Java Data Types and Variables - MCQ 1,074 views
Question Info
#2007Q ID
Not SetDifficulty
Java Data Types and Variables - MCQTopic

Choose the Best Option

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

  • A 10 20 10 100
  • B 10 20 10 20
  • C 10 20 10 10
  • D Error
Correct Answer

Explanation

Error

Share This Question

Challenge a friend or share with your study group.