Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 3 of 3

Thread: Waht is differenc in Vector and Arraylist

  1. #1
    Member
    Join Date
    Mar 2011
    Posts
    32
    My Mood
    Worried
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Waht is differenc in Vector and Arraylist

    Hii friends


    I am new in Java Development Please provide me the Solutions of my question.

    Thanks

    Regards
    Diya


  2. #2
    Junior Member codejava's Avatar
    Join Date
    Aug 2011
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Re: Waht is differenc in Vector and Arraylist

    Vector and Array List both uses Array internally as data structure. They are dynamically re sizable. Difference is in the way they are internally re sized. By default, Vector doubles the size of its array when its size is increased. But, Array List increases by half of its size when its size is increased.
    NEW TO JAVA

  3. #3
    Super Moderator Sean4u's Avatar
    Join Date
    Jul 2011
    Location
    Tavistock, UK
    Posts
    637
    Thanks
    5
    Thanked 103 Times in 93 Posts

    Default Re: Waht is differenc in Vector and Arraylist

    Always read the API documentation:
    Vector (Java 2 Platform SE v1.4.2)
    ArrayList (Java 2 Platform SE v1.4.2)

    One major difference between the two is that one of them is synchronized: you may wish to avoid the overhead of synchronization if your application is single-threaded at the point of use of an object.

Similar Threads

  1. Replies: 2
    Last Post: December 22nd, 2010, 09:21 AM
  2. Ordering ArrayList by 3 conditions as you add to ArrayList
    By aussiemcgr in forum Collections and Generics
    Replies: 4
    Last Post: July 13th, 2010, 02:08 PM
  3. Difference between Vector and Arraylist
    By Lil_Aziz1 in forum Collections and Generics
    Replies: 4
    Last Post: January 3rd, 2010, 11:03 AM
  4. Difference between Arraylist and Vector in abstractTableModel ?
    By riddhik84 in forum Collections and Generics
    Replies: 2
    Last Post: November 7th, 2009, 04:22 PM
  5. How to use an ArrayList and what is its advantage over array?
    By JavaPF in forum Java Code Snippets and Tutorials
    Replies: 1
    Last Post: May 17th, 2009, 01:12 PM