• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Rob Spoor
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Holloway
  • Piet Souris
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Frits Walraven
  • Himai Minh

Potential Error on Page 53 of OCA Java SE 8 Programmer I by Boyarsky and Selikoff

 
Greenhorn
Posts: 29
  • Likes 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I might be interpreting this table incorrectly.  The operator precedence table that begins on the bottom of page 52 and is continued on the top of page 53 says that the logical operators &, ^, | have equal precedence.  Based upon testing and confirmed by this document:

 Oracle operators precedence table

the "^", bitwise exclusive or operator, has a higher precedence than the bitwise inclusive or operator.

Any clarification would be much appreciated!

Original post/question
 
author & internet detective
Posts: 40726
827
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The bitwise operator is out of scope for the exam. The row in the table you cited says "logical operators *, &, |"
 
Jeanne Boyarsky
author & internet detective
Posts: 40726
827
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Incidentally, we confirmed the logical operators do differ in precedence:

 
Bartender
Posts: 1059
33
Eclipse IDE Postgres Database C++ Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is this out-of-scope for the 819 as well?

It isn't too hard to remember...

The bitwise operators and logical operators include the AND operator &, exclusive
OR operator ^, and inclusive OR operator |.
AndExpression:
EqualityExpression
AndExpression & EqualityExpression
ExclusiveOrExpression:
AndExpression
ExclusiveOrExpression ^ AndExpression
InclusiveOrExpression:
ExclusiveOrExpression
InclusiveOrExpression | ExclusiveOrExpression
These operators have different precedence, with & having the highest precedence
and | the lowest precedence.

 
Jeanne Boyarsky
author & internet detective
Posts: 40726
827
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes. Bitwise operators are still out of scope on the 819
 
He's giving us the slip! Quick! Grab this tiny ad!
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic