File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Collection

 
Shivakanth Thyagarajan
Ranch Hand
Posts: 41
  • 0
  • Mark post as helpful
  • send pies
  • 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
 
Sajid Moinuddin
Ranch Hand
Posts: 85
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
do u know the difference between ArrayList & vector?

try to find it out.
 
Shivakanth Thyagarajan
Ranch Hand
Posts: 41
  • 0
  • Mark post as helpful
  • send pies
  • 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.
 
deshdeep divakar
Ranch Hand
Posts: 91
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
U can go through Khalid Mughal,and K & B
And dont forgot to read out JLS
 
Krish Pinnamaneni
Greenhorn
Posts: 22
  • 0
  • Mark post as helpful
  • send pies
  • 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.
 
Nikhilesh Fonseca
Ranch Hand
Posts: 57
  • 0
  • Mark post as helpful
  • send pies
  • 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.
 
Tony Morris
Ranch Hand
Posts: 1608
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks guys for your kind response.

Shivakanth
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic