[Updated] Goldman Sachs Aptitude Test Questions and Answers
Practice List of TCS Digital Coding Questions !!!
Take 50+ FREE!! Online Data Interpretation Mock test to crack any Exams.

JAVA Programming :: Basic Concepts - Discussion

Home > JAVA Programming > Basic Concepts > MCQs Questions Discussion

49 / 64

What is the output of the below code.

public class Example {
int x = 50;
int y = 100;
public static void main(String args[]) {
int x = 0, y = 10;
Example ex = new Example();
while(x <  {
 x++; y--;
}
System.out.println("X = "+x+",Y ="+y);
}
}

ACompilation fails because of an error at line 8

Bx = 3, y = 7

CRuntime Error

DCompilation fails because of an error at line 9

Ex=53, y=97

Answer: Option (Login/Signup)

Show Explanation

Asked In :: TCS NQT

Post Your Answer Here:     

No Discussion on this question yet!