• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Operators Precedence

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
whats the precedence of bitwise operator if they occur in a statement for example say 8|9&10^11. what will be the excat order in which they will be executed.can i get a detailed info regarding Operators precedence somewhere on net or in some book.
Thanks in advance
 
Ranch Hand
Posts: 242
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
8|9&10^11 => 8|((9&10)^11)
Operator Precedence Hierarchy
|
Top|- ++(postfix), --(postfix)
(High |- ++(prefix), --(prefix), +(unary), -(unary), ~, !
precedence) |- (type)
|- *, /, %
|- +(binary), -(binary)
|- <<, >>, >>>
|- <, >, <=, >=, instanceof
|- ==, !=
|- &
|- ^
|- |
|- &&
Bottom|- | |
(Low |- ?:
precedence)|- =, +=, -=, *=, /=, %=, >>=, <<=, >>>=, &=, ^=, |=
|
This is from yezhang site. http://members.nbci.com/yezhang/SCJP2/
Santhosh.
 
Ranch Hand
Posts: 3141
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Vivek ...
I've got some notes on operator precedence posted here http://webhome.idirect.com/~jgriscti/oper/precedence.html
Hope they help.
------------------
Jane
The cure for boredom is curiosity.
There is no cure for curiosity.
-- Dorothy Parker
 
reply
    Bookmark Topic Watch Topic
  • New Topic