--%>

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 : Print the factors of each perfect number

    An integer number is said to be a perfect number if its factors, including 1 (but not the number itself), sum to be the number. For example, 6 is a perfect number because 6 = 1+ 2+ 3. Write a function perfect that determines if parameter number is a perfect number. Us

  • Q : What are good examples of element

    What are good examples of element attributes?

  • Q : Determine incorrect tags in HTML What

    What is incorrect with my < br > Tags?

  • Q : Uses of BYTE Write a program that shows

    Write a program that shows the uses of BYTE, WORD and DWORD?

  • Q : Define the term Key value Define the

    Define the term Key value: The object employed to produce an associated hash code for look-up in an associative data structure.

  • Q : Advantages of Object oriented

    Q. What are the advantages of Object Oriented Programming languages? Explain them. Ans. : Object oriented programming language has following advantages-

    Q : What are the tools require writing

    What are the tools require writing XHTML documents?

  • Q : Define Passing by value Passing by

    Passing by value: In this process separate memory builds for formal arguments and when any modifications done on formal variables, it will not influence the real variables. Therefore actual variables are preserved in this situation.

  • Q : Define the term Inheritance Inheritance

    Inheritance: It is a feature of object-oriented programming languages in which a sub-type inherits methods and variables from its super-type. The Inheritance is most generally employed as a synonym for class inheritance {class!inheritance}, however in

  • Q : What is Binary operator Binary operator

    Binary operator: It is an operator taking two operands. Java has numerous binary operators, like the arithmetic operators +, -, *, / and %, and the Boolean operators &&, || and ^, among others.