Computer Applications

Predict the output of the following code snippet:


int a = 1;
int b = 2;
if (a == b)
System.out.println ("Both values are equal");
else
System.out.println ("Values are not equal");
  1. Both values are equal
  2. Incorrect use of the == operator
  3. Values are not equal
  4. No output

Java Conditional Stmts

11 Likes

Answer

Values are not equal

Answered By

1 Like


Related Questions