Results 1 to 2 of 2

Thread: array vs Vector

  1. #1
    paty is offline Member
    Join Date
    Jul 2007
    Posts
    41
    Rep Power
    0

    Default array vs Vector

    I'm a little bit new in java, and I have a doubt about array and vector
    I know that a vector is an array
    so why does vector exist? what are the differences between them?

  2. #2
    Swamipsn is offline Member
    Join Date
    Jul 2007
    Posts
    74
    Rep Power
    0

    Default

    Hi,
    Array is a static data structure but vertor is dynamic. For example if you
    declare int a[10] as array you are able to store only 0 to 9 values. When you declare the same Vector a its dynamically grow depends on your code, you can store 1 to ...etc data in that.

Similar Threads

  1. Convert a vector to a string array
    By orchid in forum New To Java
    Replies: 4
    Last Post: 02-24-2010, 03:31 AM
  2. How i add string array in vector
    By susan in forum New To Java
    Replies: 7
    Last Post: 02-12-2009, 02:32 PM
  3. Converting an Array to a Vector
    By Java Tip in forum java.lang
    Replies: 0
    Last Post: 04-14-2008, 09:44 PM
  4. Vector help
    By king_arthur in forum New To Java
    Replies: 3
    Last Post: 01-22-2008, 08:33 PM
  5. Array or Vector
    By ravian in forum New To Java
    Replies: 2
    Last Post: 11-18-2007, 07:19 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •