This week's book giveaway is in the Java in General forum.
We're giving away four copies of Event Streams in Action and have Alexander Dean & Valentin Crettaz on-line!
See this thread for details.
Win a copy of Event Streams in Action this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Syntax java

 
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
is this syntax has amean in java

return (count << 16) ^ accumulated;
 
Ranch Hand
Posts: 573
1
VI Editor Chrome Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yeah.  Shift the count left 16 places, then bitwise XOR with accumulated.
 
author & internet detective
Posts: 39392
763
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are studying for the OCA exam, note that bitwise operators are out of scope. (If you are just curious, that's cool. But figured  i should mention it since you posted in the cert forum)
 
Jim Venolia
Ranch Hand
Posts: 573
1
VI Editor Chrome Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Really?  I've been an embedded guy for 40 years, and have decoded more than my share of bit streams (1553 and MPEG being most prominent).  Not to mention dealing with several brain dead hardware instruction sets.

So the one thing I focus on in a language is the one thing that is mostly ignored?  I has a sad.
 
Jeanne Boyarsky
author & internet detective
Posts: 39392
763
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Jim Venolia wrote:Really?  


Yes, really. It was on the exam a long time ago (Java 1.4 or 1.5 I believe)

Jim Venolia wrote: I've been an embedded guy for 40 years, and have decoded more than my share of bit streams (1553 and MPEG being most prominent).  Not to mention dealing with several brain dead hardware instruction sets.

So the one thing I focus on in a language is the one thing that is mostly ignored?  I has a sad.


Most people don't deal with bitwise operators though. So while it is common in your domain, it's not across the board.
 
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

result: 131074
 
Marshal
Posts: 65053
247
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

joseph hu wrote:. . .result: 131074

How does that help with the current problem? It doesn't show whether the hash code is the same for two instances returning true from the equals() method.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!