• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

A question from Mock Exam

 
Jisha Anand
Ranch Hand
Posts: 62
Flex Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear All,

I encountered the following question while attempting a practice test in http://examprep.whizlabs.com



The answer given was: Choices B and C are the correct answers.

Is this correct?
Of course C is correct; but if B is correct the case when x == y will make z = x; where as in the given code z = y for the same case right?
I thought the question was an easy one; but now confused Please help!
 
Jhakda Velu
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
x=1
y=1
taking option b
the end result is still the same
whether z=x or z=y, both the answers will be the same,right?

Jhakda
 
Prabz Bhatia
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hehe...
myself got confused in this one at first...

when x==y, does it matter what it returns??? Because x and y are the same!!!..


 
Jisha Anand
Ranch Hand
Posts: 62
Flex Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
true....how stupid i am

thanks a lot!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic