• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Collection

 
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Greetings,
I am preparing for SCJP certification. I need to know the depth with which i need to concentrate on collection. Please guide me.




Regards.
Shivakanth.T
 
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
do u know the difference between ArrayList & vector?

try to find it out.
 
Shivakanth Thyagarajan
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Sajid,
ArrayList is part of Collection framework and Vector represents the earlier version of JDK. Both of them represent growable array using the index. For traversing ArrayList uses Iterator interface while Vector makes use of Enumerator interface. I presume this can satisfy you. if not convey to me. I will try to answer for you.
 
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Hi,
U can go through Khalid Mughal,and K & B
And dont forgot to read out JLS

 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
The main Difference between ArrayList and Vector is:
1] All the methods of ArrayList by default not "syncronized".Where all the methods of Vector are "syncronized".
2]But ArrayList also provides a way to make it's method syncronized if required.
So Using ArrayList makes the program more faster than using Vector.The reason is syncronized method impacts the performance of program.If you are not concerned with Thread's then it is best to use ArrayList than Vector.
 
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I thnk for the purpose of the exam you only need to kno when to use them
i.e which collection would most satisfy a particular set of conditions..ie which wud provide unique elements ,key value pairs etc..these it self an be tricky at times but are mostly easy.
In majority of the mock tests that is what is covered but the khalid mughal
gives a lot more information..If you have the time do go thru it.
Also give the test at javacertificate.com there are a lot of questions on collection implemention there if you want to get scared and start studying the chapter all over again..
But I thnk you should wait for a reply from someone Higher up the Ladder.
 
Ranch Hand
Posts: 1608
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Vector exists for reverse compatibility.
Vector has not been formally deprecated because several core APIs depend on it.
Vector should only be used in obscure scenarios; specifically, where you are supporting JRE 1.1 or you depend on some old or broken core or third party API where it is required.
http://www.xdweb.net/~dibblego/java/faq/answers.html#q35
 
Shivakanth Thyagarajan
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks guys for your kind response.

Shivakanth
 
reply
    Bookmark Topic Watch Topic
  • New Topic