## 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? b=x1*2==x2; b

## Which of the following will produce a value of 10 if x=9.7?

Q41. Which of the following will produce a value of 10 if x=9.7? Math.floor(x) Math.abs(x) Math.round(x) Math.ceil(x) Ans. 3. Math.round(x)

## Which of the following will produce a value of 22 if x=229?

Q40. Which of the following will produce a value of 22 if x=229? Math.ceil(x) Math.round(x) Math.abs(x) Math.floor(x) Ans. 3. Math.abs(x)

## Result of the expression 9|9

Q39. What will be result of the expression 9|9? 1 18 9 None of the above. Ans. 3. 9

## Result of expression 13 & 25.

Q38. What will be the result of the expression 13 & 25?   (1310 =000011012, 2510=000110012) 38 25 9 12 Ans.

## Default value of char type variable.

Q37. The default value of char type variable is ‘\u0020’ ‘\u00ff ” “ ‘\u000’ Ans. 4. ‘\u000’

## Which assignments are invalid?

Q36. Which of the following assignments are invalid? float x=123.4 long m=023 int n=(int) false; double y=0X756 Ans. 4. double y=0X756

## Which of the following represent(s) a hexadecimal number?

Q35. Which of the following represent(s) a hexadecimal number? 570 (hex)5 0X9G 0X5 Ans. 4. 0X5