Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JavaCaps mock 1 Q:51

 
Haining Mu
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
51. Which of the following places no constraints on the type of elements, order of elements, or repetition of elements with in the collection.?
A) Collection
B) collection
C) Map
D) Set
Answer: B
can somebody give an explaination? thanks.
 
Thomas Paul
mister krabs
Ranch Hand
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ummmm... not a clue. I have no idea what the significance of a "collection" with a lower case "c" might be.
 
Haining Mu
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Thomas Paul:
Ummmm... not a clue. I have no idea what the significance of a "collection" with a lower case "c" might be.

so, the question in JavaCap maybe a typo? answer Collection should be correct then, right?
 
Rehan Malik
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Haining Mu:
51. Which of the following places no constraints on the type of elements, order of elements, or repetition of elements with in the collection.?
A) Collection
B) collection
C) Map
D) Set
Answer: B
can somebody give an explaination? thanks.


I'm guessing it might be a trick question??
If "collection" class does not exist, then it can't have any constraints I'm assuming. i might be wrong. But that question is a little misleading in that case.
 
yaeger rosenberg
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Isn't there a limitation on types in a collection; i.e. non-primitive? If so, then the wording of the question is a bit ambiguous
 
Thomas Paul
mister krabs
Ranch Hand
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think it comes back to what is the significance in the mind of the person who wrote this question of a collection with a lower case c? I would say that the correct answer is none of the above.
------------------
Tom - SCJP --- Co-Moderator of the Programmer Certification Forums
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic