• Post Reply Bookmark Topic Watch Topic
  • New Topic

precedence & associativity  RSS feed

 
urvi kalia
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what is value of a ?
how is it evaluated


class EBH106 {
public static void main(String args[]) {
int a = 1; a += ++a + a++; System.out.print(a);
}}
 
Rusty Shackleford
Ranch Hand
Posts: 490
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
run it and find out what the value is

Then using the precedence rules try to find out how to get that number.

Post your guess here, and see if you are right.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!