Vectors

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • praveenkumarvpk
    New Member
    • Oct 2007
    • 22

    Vectors

    is Vector synchronized? if, then how?
    What about ArrayList?

    Thank You!
  • dmjpro
    Top Contributor
    • Jan 2007
    • 2476

    #2
    Originally posted by praveenkumarvpk
    is Vector synchronized? if, then how?
    What about ArrayList?

    Thank You!
    Read the API DOC.
    You know synchronization ?
    Then I think you will be able to understand the API DOC.

    Debasis Jana

    Comment

    • JosAH
      Recognized Expert MVP
      • Mar 2007
      • 11453

      #3
      Originally posted by praveenkumarvpk
      is Vector synchronized? if, then how?
      What about ArrayList?

      Thank You!
      A Vector synchronizes on all its getElement/get, setElement/set etc. methods.
      The Vector class is quite old and has be retrofitted in the Collections framework
      to conform to the List interface.

      The synchronization is a bit useless and the ArrayList doesn't synchronize any-
      thing at all (and is therefore a bit faster than a Vector as well).

      kind regards,

      Jos

      Comment

      Working...