CoolInterview.com - World's Largest Collection of Interview Questions & Answers, FAQs, queries, sample papers, exam papers, dumps, what, why, how, where, when questions
Interview Success Kit - Get Success in Job Interviews Interview Success Kit - 30,000 Interview Que. & Ans.
Covers 30,000+ Interview Questions asked in actual MNC Interviews - all with model answers.
Get Your Dream Job Now - www.vyoms.com
Sponsored Links
Interview Questions
Our Services

INTERVIEW QUESTIONS C++ ARRAYS, STRINGS, POINTERS AND REFERENCES IN C++ DETAILS
Question :
Difference between "vector" and "array"?


Category Arrays, Strings, Pointers and References in C++ Interview Questions
Rating (3.1) By 40 users
Added on 7/19/2011
Views 2671
Rate it!
Answers:

Vector and ArrayList are very similar. Both of them represent a 'growable array', where you access to the elements in it through an index.<br>ArrayList it's part of the Java Collection Framework, and has been added with version 1.2, while Vector it's an object that is present since the first version of the JDK. Vector, anyway, has been retrofitted to implement the List interface.<br>The main difference is that Vector it's a synchronized object, while ArrayList it's not.<br>While the iterator that are returned by both classes are fail-fast (they cleanly thrown a ConcurrentModificationException when the orignal object has been modified), the Enumeration returned by Vector are not.<br><br>Unless you have strong reason to use a Vector, the suggestion is to use the ArrayList<br><br> <br>



If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-

  • There should not be any Spelling Mistakes.
  • There should not be any Gramatical Errors.
  • Answers must not contain any bad words.
  • Answers should not be the repeat of same answer, already approved.
  • Answer should be complete in itself.
  • Name :*
    Email Id :*
    Answer :*
    Verification Code Code Image - Please contact webmaster if you have problems seeing this image code Not readable? Load New Code
    Process Verification Enter the above shown code: *
    Inform me about updated answers to this question

    Related Questions
    View Answer
    Explain "passing by value", "passing by pointer" and "passing by reference"

    View Answer
    What is "strstream??

    View Answer
    why array index starts from 0[zero] only?

    View Answer
    Why Pointers are not used in C Language. What are the main differences between C and C++

    View Answer
    How can double dimensional arrays be dynamically initialized in C++?




    View Answer
    Why always array starts with index 0?

    View Answer
    Can you allocate the memory using malloc() in C and deallocate the same memory using free() in c++

    View Answer
    What is a memory leak? How can we avoid it?
    View Answer
    Can you store multiple data types in System.Array?
    View Answer
    What is the difference between the System.Array.CopyTo() and System.Array.Clone()?
    View Answer

    Please Note: We keep on updating better answers to this site. In case you are looking for Jobs, Pls Click Here Vyoms.com - Best Freshers & Experienced Jobs Website.

    View ALL Arrays, Strings, Pointers and References in C++ Interview Questions & Answers

    User Options
    Latest 20 Questions
    How to Retrieve a Cookie Value ?
    How to Create a Cookie?
    What is ViewState ?
    What are different methods of session maintenance in ASP.NET?
    What is cross cutting concern and concern in spring AOP ?
    What are the important beans lifecycle methods ?
    Explain the advantages of using DAO module?
    What is SQLProvider ?
    How struts application can be integrated with spring?
    What are the advantages of spring framework?
    What is ?Throws advice? in Spring ?
    What is Metadata Autoproxying ?
    Describe about DAO in Spring framework ?
    What is called an Advice ?
    What is IOC?
    What are the types of Dependency Injection?
    What are the different Modes of Autowiring ?
    Define Application context module?
    Why Spring framework is needed?
    What is called Spring MVC?


    Copyright ©2003-2016 CoolInterview.com, All Rights Reserved.
    Privacy Policy | Terms and Conditions

    Download Yahoo Messenger | Placement Papers| FREE SMS | ASP .Net Tutorial | Web Hosting | Dedicated Servers | C Interview Questions & Answers

    Testing Articles | Testing Books | Testing Certifications | Testing FAQs | Testing Downloads | Testing Interview Questions | Testing Jobs | Testing Training Institutes


    Cache = 0.015625 Seconds