Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

q from sun's epractice exam

 
JayaSiji Gopal
Ranch Hand
Posts: 303
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


wht is the result?
What is the result?





A
x = 0
B
x = 1
C
x = 2
D
x = 3
E
x = 4
F
Compilation fails

i answered x = 2. but the correct answer is x=4
i answered x=2, bcos b=false sets the value of b to false.so,doesnt the if loop return true?
plz explain.
 
Barry Gaunt
Ranch Hand
Posts: 7729
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"b=false sets the value of b to false"
You are correct, but what is the value of the expression ?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic