<code> Hi all Could some one explain why the result of l >> 32 (where long l = 1) and i >> 32(where int i = 1) is different? Thanks in advance BTW i read somewhere that this forum is going to be closed soon after jan 1st 2002, is it true?? </code>
posted 14 years ago
Hi arsho, A long has 64-bits and an int 32-bits so shifting bits with i>>32 wraps the bits. Check out the Cat and Mouse Games with Bits tutorial for how bit-shifting works.
BTW i read somewhere that this forum is going to be closed soon after jan 1st 2002, is it true??
No. Someone is pulling your leg ------------------ Jane Griscti Sun Certified Programmer for the Java� 2 Platform Co-author Mike Meyers' Java 2 Certification Passport