Win a copy of 97 Things Every Java Programmer Should Know 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
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

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: 574
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: 39996
807
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: 574
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: 39996
807
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: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

result: 131074
 
Marshal
Posts: 69424
276
  • 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.
 
If you are using a wood chipper, you are doing it wrong. Even on this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic