• 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
  • Liutauras Vilda
  • Bear Bibeault
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Frits Walraven
Bartenders:
  • Carey Brown
  • salvin francis
  • Claude Moore

Syntax java  RSS feed

 
Ranch Hand
Posts: 61
  • 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: 523
Chrome Linux VI Editor
  • 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: 39244
727
Eclipse IDE Java VI Editor
  • 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: 523
Chrome Linux VI Editor
  • 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: 39244
727
Eclipse IDE Java VI Editor
  • 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: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

result: 131074
 
Marshal
Posts: 64172
215
  • 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.
 
His brain is the size of a cherry pit! About the size of this ad:
Create Edit Print & Convert PDF Using Free API with Java
https://coderanch.com/wiki/703735/Create-Convert-PDF-Free-Spire
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!