What will be displayed after the following statements are executed?
int x = 65;
Int y = 55;
If (x >= y)
{
Int ans = x + y;
}
System.out.println(ans) ;
A) 10
B) 120
C) 100
D) The code contains an error and will not compile.
Correct Answer:
Verified
Q4: If str1 and str2 are both String
Q15: The if-else statement will execute one group
Q18: An important style rule that should be
Q22: The _ statement is used to create
Q23: A _ is a boolean variable that
Q24: What will be the values of ans,
Q34: Which of the following statements determines whether
Q35: What will be the value of x
Q36: What will be the value of ans
Q56: Which of the following expressions will generate
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents