Difference between collection and arrays

Write the difference between collection and arrays?

E

Expert

Verified

a.) Array:

  • In this one need to give the size of the array during its declaration.
  • Array could not be adjusted dynamically.
  • The members of the array must be of the similar data type.


b.) Collection:

  • The size of the collection can be resized dynamically, according to the user's requirement.
  • Collection does not have permanent size.
  • It could have elements of dissimilar types.

 

   Related Questions in Programming Languages

  • Q : Block Started by Symbol What is the

    What is the Block Started by the Symbol?

  • Q : What is an Import statement Import

    Import statement: A statement which makes the names of one or more interfaces or classes accessible in a different package from the one in which they are stated. Import statements pursue any package declaration {package!declaration}, and precede any i

  • Q : Public class in java Q. Explain the

    Q. Explain the concept of public classes in java. How they are useful? 

  • Q : Define the synchronization objects

    Define the synchronization objects. Ansewr: A synchronization object is use to co-ordinate the execution of many threads.

  • Q : What is an Overriding for breadth

    Overriding for breadth: It is a form of method overriding in which the sub-class version of a technique implements its own behavior within the context of attributes and behavior of the sub-class and then calls the super-class version and hence it can

  • Q : What is Factory pattern Factory pattern

    Factory pattern: A pattern of class definition which is employed as a generator of instances of other classes. Frequently employed to form platform- or locale-particular implementations of abstract classes or interfaces. This decreases coupling betwee

  • Q : C programming assignment help S trings,

    Strings, Pointers, Arrays, Structures, and File I/O in C In this lab you will develop a few programs that will give you some practice with pointers, arrays, str

  • Q : Explain If-else statement If-else

    If-else statement: It is a control structure employed to select between performing one of two alternative events.     if(boolean-expression){        // Statem

  • Q : Explain the Automated Software testing

    Explain the Automated Software testing life cycle.

  • Q : Define Context Normal 0 false false

    Normal 0 false false

©TutorsGlobe All rights reserved 2022-2023.