Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

bitshift operator and bitwise operators throwing errors

J2EE_LifeDec 26 2011 — edited Dec 28 2011
Hi,

I am using Java 1.4 on JDeveloper.

When I try to complie following piece of code, its gives error:
package myOtherPackage;


class BitDemo {
    public static void main(String[] args) {
        int bitmask = 0x000F;
        int val = 0x2222;
        // prints "2"
        System.out.println(val & bitmask);
    }
}
Error: method >>(java.lang.String, int) not found in class myOtherPackage.BitDemo.

Kindly help me on this....
This post has been answered by 801313 on Dec 26 2011
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 25 2012
Added on Dec 26 2011
5 comments
266 views