• 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

help needed in operator precedence/associativity ?

 
Ranch Hand
Posts: 924
1
Netbeans IDE Fedora Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
its been quite some time i did my ocpjp 6 and i have to admit that i never understood operator evaluation, precedence, associativity. the other day i was googling and i found this link on stackoverflow. i read it but was not able to comprehend it fully.i love javaranch and the way people post answers here so i wanted to give another shot at operators and would like to have good discussion on this topic. for that i would like to just have a look at the link here http://stackoverflow.com/questions/6800590/what-are-the-rules-for-evaluation-order-in-java. i do not want you to read it fully , just read eric lipert's answer. i understood few things but still if somebody can explain in more good , understandable, crisp clear way giving examples it would be beneficial for all the ranchers out there
 
Ranch Hand
Posts: 247
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am not here to explain you eric's answer because i myself haven't understood it properly , its too difficult man, requires around 1 hour to understand. Anyways but way below eric's answer there is Donal Fellows's answer (he too has a good reputation man) where he says eric's answer is not quite helpful in Java. And i think the topic which you are asking is given nicely in books and that too in a bit easier manner.

Anyways someone much better and experienced person than me might help you here.
 
gurpeet singh
Ranch Hand
Posts: 924
1
Netbeans IDE Fedora Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks for the reply Rameshwar. textbooks gives very rudiment idea about all this. that is what was Eric's point. he says that(in the last few lines) that he has edited innumerable textbooks . but i found a link on Eric's blog that has given me somewhat good picture about this. here is the link if you are interested to read http://blogs.msdn.com/b/ericlippert/archive/2008/05/23/precedence-vs-associativity-vs-order.aspx

though he talks about c# but at stackoverflow.com he says that it is valid for java as well.
 
Ranch Hand
Posts: 256
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Request you to post this in Java General forum. You'll get more hits there.
 
author
Posts: 23951
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
First, it may be a good idea to explain what you don't understand -- saying "I don't understand the blog and can you explain it to me in a way I understand" doesn't work. After all, how can we explain something in a different way, and know that it would work?

Second, this topic has come up before -- so SearchFirst.

Henry
reply
    Bookmark Topic Watch Topic
  • New Topic