File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes a question? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Reply Bookmark "a question?" Watch "a question?" New topic
Author

a question?

Ashish Jain
Ranch Hand

Joined: Sep 23, 2000
Posts: 50
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;>
ans is 2 & 4.
why ans is also 4?

Ashish Jain<br />MCP, SJCP, IBM XML, SCEA
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: a question?
 
Similar Threads
MockExam2 Question
Marcus Green's Exam 2 #46
question frm Mock Test abt Bit shift operator
Bit shifting
Marcus Q46