• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Collections Question

 
Monisha Talwar
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do I need to know how to add elements to the different collections.
Kathy/Berts book says the exam will emphasize on understanding when to use which collection, rather than the related methods.
I came accross the question below in a mock...Can questions like this and alike be asked in the exam.
Q. 49
What is the effect of adding the sixth element to a vector created in the following manner:
new Vector(5, 10);
(A)An IndexOutOfBounds exception is raised.
(B)The vector grows in size to a capacity of 10 elements
(C)The vector grows in size to a capacity of 15 elements
(D)Nothing, the vector will have grown when the fifth element was added
Select the most appropriate answer.
Monisha.
 
Reshma Shanbhag
Ranch Hand
Posts: 204
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Monisha,
kathy is right. I gave my exam recently, and never came across any questions that asked for details regarding the methods of the collection classes. But you need to know the significance for each collection implementation and their appropriate usage.
Aslo the objectives of SCJP 1.4 for Collection framework mentions

1. Make appropriate selection of collection classes/interfaces to suit specified behavior requirements.
2. Distinguish between correct and incorrect implementations of hashcode methods.

Hope this helped you
Reshma
 
Monisha Talwar
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Reshma.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic