Given the declarations boolean b; short x1=100, x2=200, x3=300; Which of the following are evaluated to true?

Q42. Given the declarations

boolean b;

short x1=100, x2=200, x3=300;

Which of the following are evaluated to true?

  1. b=x1*2==x2;
  2. b = x1 + x2 != 3 * x1;
  3. b= (x3 -2 * x2 <0 || ((x3 = 400) < 2 ** x2);
  4. b= (x3 -2  * x2 > 0) || ((x3= 400)) 2* x2);

Ans.

2. b = x1 + x2 != 3 * x1;

Leave a Reply

Your email address will not be published. Required fields are marked *

23 Views
%d bloggers like this: