• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JavaCaps Mock exam

 
Nils Widmer
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
http://www.javacaps.com/scjp_mockexams1.html

31. The statement X %= 5, can best described as?
A) A equals a divided by 5;
B) A equals A in 5 digit percentage form
C) A equals A modulus 5.
D) None of the above

well spelling errors, and that is not the only one...

------------------
 
deep_sal
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The answer is c)
 
Nils Widmer
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
nope, its D)
 
Jane Griscti
Ranch Hand
Posts: 3141
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi deep_sal,
Please read the JavaRanch Name Policy and re-register using a name that complies with the rules.
Thanks for your cooperation.
------------------
Jane Griscti
Sun Certified Programmer for the Java� 2 Platform
 
Jimmy Blakely
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
X %= 5
is equivalent to...
X = X % 5
which written out is ...
X equals X modulus 5
thus making answer D correct.
Having the author change the identifiers didn't help.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic