aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes shift operators Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "shift operators " Watch "shift operators " New topic
Author

shift operators

Raghav Mathur
Ranch Hand

Joined: Jan 12, 2001
Posts: 641
int i =10
int result = i<< 4;
as a thumb rule .... this means ,int result = 10*2 to the power 4;
int result = i>>4
as a thumb rule .... this means ,int result = 10/2 to the power 4 ;

please if anybody could explain me >>> operator .


Raghav.
Rob Ross
Bartender

Joined: Jan 07, 2002
Posts: 2205
>>> is the unsigned shift operator.
You have to understand how the shift operator really works to understand the difference. Your rules of thumb are true, but they aren't going to help you understand >>>. There are a lot of threads that deal with this topic alread. Do a search in this forum for "shift" and you'll get your answer.


Rob
SCJP 1.4
Raghav Mathur
Ranch Hand

Joined: Jan 12, 2001
Posts: 641
i would really appreciate if you could explain it to me . I like to make thumb rules as it makes me understand a pirticular thing ,well .
thanks in advance
raghav mathur
Originally posted by Rob Ross:
>>> is the unsigned shift operator.
You have to understand how the shift operator really works to understand the difference. Your rules of thumb are true, but they aren't going to help you understand >>>. There are a lot of threads that deal with this topic alread. Do a search in this forum for "shift" and you'll get your answer.
Rodney Woodruff
Ranch Hand

Joined: Dec 04, 2001
Posts: 80
Try this link. It helped me alot.
http://www.javaranch.com/campfire/StoryBits.jsp


Hope This Helps
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: shift operators
 
Similar Threads
i++ and - -i
2nd Annual - SCJP Study Aids Contest !!!
Need help in Shift operators
regarding Shift Operators
shift opeartors - need help