File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Collection Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Collection " Watch "Collection " New topic
Author

Collection

Shivakanth Thyagarajan
Ranch Hand

Joined: Mar 28, 2005
Posts: 41
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
Sajid Moinuddin
Ranch Hand

Joined: Mar 19, 2005
Posts: 85
do u know the difference between ArrayList & vector?

try to find it out.
Shivakanth Thyagarajan
Ranch Hand

Joined: Mar 28, 2005
Posts: 41
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.
deshdeep divakar
Ranch Hand

Joined: Apr 19, 2004
Posts: 91
Hi,
U can go through Khalid Mughal,and K & B
And dont forgot to read out JLS


"Do not be afraid of going slow, be afraid of standing still"
Krish Pinnamaneni
Greenhorn

Joined: Mar 16, 2005
Posts: 22
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.
Nikhilesh Fonseca
Ranch Hand

Joined: Aug 23, 2004
Posts: 57
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.
Tony Morris
Ranch Hand

Joined: Sep 24, 2003
Posts: 1608
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


Tony Morris
Java Q&A (FAQ, Trivia)
Shivakanth Thyagarajan
Ranch Hand

Joined: Mar 28, 2005
Posts: 41
Thanks guys for your kind response.

Shivakanth
 
wood burning stoves
 
subject: Collection