This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes operator precedence and associativity Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "operator precedence and associativity" Watch "operator precedence and associativity" New topic

operator precedence and associativity

Neil Laurance
Ranch Hand

Joined: Jul 18, 2002
Posts: 183
I'm trying to find the exact operator precedence and associativity rules for Java. I found the following links online:
But the best source in my opinion is the table in the 'Java in a Nutshell' book by David Flanagan.
Anyways, Bruce Eckel's book contains the following mnemonic suggestion for remebering the precedence rules:
Ulcer - Unary
Addicts - Arithmetic
Really - Relational
Like - Logical
C - Conditional (ternary)
A Lot - Assignment
Does anyone know of other mnemonics for a more exact precedence AND associativity definition?
Thanks, Neil :roll:
Jessica Sant

Joined: Oct 17, 2001
Posts: 4313

Check out this thread:
How you remember the operator precedence?
It refers to this thread:
Best Java Memory Aid Contest

- Jess
Blog:KnitClimbJava | Twitter: jsant | Ravelry: wingedsheep
Sarma Lolla
Ranch Hand

Joined: Oct 21, 2002
Posts: 203
The first link is not working. Can you please provide the correct link?
I agree. Here's the link:
subject: operator precedence and associativity
Similar Threads
answers to Mock Exam
K&B Operator precedence
Logical operator precedence
Operator Associativity
operator precedence