Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 5. Operators and Expressions > Precedence and Associativity Rules for O...

5.3. Precedence and Associativity Rules for Operators

Precedence and associativity rules are necessary for deterministic evaluation of expressions. The operators are summarized in Table 5.2. The majority of them are discussed in subsequent sections in this chapter.

Table 5.2. Operator Summary
Postfix operators[] . (parameters)expression++expression--
Unary prefix operators++expression --expression +expression -expression ~ !
Unary prefix creation and castnew (type)
Multiplicative* / %
Additive+ -
Shift<< >> >>>
Relational< <= > >= instanceof
Equality== !=
Bitwise/logical AND&
Bitwise/logical XOR^
Bitwise/logical OR|
Conditional AND&&
Conditional OR||
Conditional?:
Assignment= += -= *= /= %= <<= >>= >>>= &= ^= |=



  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial