He is the question again,
Given the following variables which of the following lines will compile without error?
String s = "Hello";
long l = 99;
double d = 1.11;
int i = 1;
int j = 0;
1) j= i << s;
2) j= i << j;
3) j=i << d;
4) j=i << l;
The correct answer is 2 & 4.I thought that it was only 2.Can anyone explain why it 4 too?Does'nt it apply arithmetic promtion here?Please help me.
Thanks
Sangi
[This message has been edited by Jim Yingst (edited June 15, 2000).]