posted 17 years ago
Question.
byte b = 1;
char c = 1
short s = 1;
int i = 1;
Select 3 correct answers.
a) s = b * 2;
b) i = b << s;
c) b <<= s;
d) c = c + b;
e) s =+ i;
Ans- b,c,e
I know for implicit narrowing conversion the source should be constant of int,char,byte or short and destination char byte short
and the values should be in range.
So in this case why is b,d type incompatible?
The future belongs to those who believe in the beauty of their dreams.Dream BIG! 