Win a copy of Soft Skills: The software developer's life manual this week in the Jobs Discussion forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Question 16, Practice Exam from K&B Book

 
Konrad Till
Greenhorn
Posts: 7
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can anybody explain me, why does this code print also "0"?
(the code is slightly modified by me - added the println statement)
It looks like 0 > 0 returns true. I'm quite confused about that.

 
dennis deems
Ranch Hand
Posts: 808
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try printing the current thread Id just before x is printed, and see if that helps to clear things up.
 
Konrad Till
Greenhorn
Posts: 7
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks! I totally forgot about that statement ;)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic