Alright, so I have seen <<
and >>
in a few different Java Programs and I have an idea of what they do, but I have no idea what you would use them for. I haven't ran into a problem where I need to use them, so if someone could explain exactly what they do and give and show some examples of when and why you would need them, that would be much appreciated.
Doogledude123
45
Posting Whiz
Recommended Answers
Jump to PostIn java,
x<<y
shifts x y bits to the left.x>>y
arithmetically shifts x y bits to the right.x>>>y
All 4 Replies
Labdabeta
182
Posting Pro in Training
Featured Poster
Doogledude123
45
Posting Whiz
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
Doogledude123
45
Posting Whiz
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.