Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

operators

 
ajit a
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all ..
how to resolve questions like
int a = 6; b = 7,c;
c = a++ + ++b;
thx in advance
... @jit
 
Corey McGlone
Ranch Hand
Posts: 3271
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just evaluate the operands from left to right, like this:

You can do a search in this forum and find lots of examples like this.
Corey
 
Rob Ross
Bartender
Posts: 2205
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ajit a:
Welcome to JavaRanch. Please change your name to comply with the naming policy to which you agreed when you registered here..

For your publicly displayed name,
use a first name, a space, and a last name.

You can change your name here:
here

You can also find the naming policy here:
http://www.javaranch.com/name.jsp
Thank You!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic