--%>

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 : Define Unions Unions: Unions in C and

    Unions: Unions in C and C++ are object overlays—aggregate quantities such as structs, except that each element of the union consists offset 0, and the total size of union is only as large as is required to hold its largest member (Kernighan and

  • Q : What is Cascading if-else statement

    Cascading if-else statement: A form of if-else statement in which all else-part (apart from the last) comprises of a further nested if-else statement. Employed to overcome the trouble of textual drift frequently related with nested if statements.

  • Q : Explain Operating system Operating

    Operating system: The operating system permits a computer's hardware devices to be accessed by the programs. For example, it permits data to be managed on a computer's disks in the form of a file system and it delivers the co-ordinate positions of a m

  • Q : Non linear dynamic model equation to

    Could you please show the steps from non linear dynamic model equation to linear equation?

  • Q : Throughout system testing the

    Someone complains that throughout system testing the application frequently crashes. What probable process problem does which indicate?

  • Q : Define the term Heterogeneous collection

    Define the term Heterogeneous collection: It is a collection of objects with distinct dynamic types

  • Q : Explain Relative filename Relative

    Relative filename: It is a filename whose full path is associative to some point within a file system tree-frequently the present working folder (that is, directory). For example:   

  • Q : Define software Define the term

    Define the term software?

  • Q : Write a program that prints out 20

    Write a program that prints out 20 random cards form a standard deck of 52 cards. Make sure the program prints out different sets of cards from one run to the next.

  • Q : Edit things in Moodle Normal 0 false

    Normal 0 false false