--%>

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 Delegation Delegation : The

    Delegation: The procedure by which an object passes on a message has received to a sub-ordinate object. When inheritance is not accessible in a programming language, then delegation is the most viable option for ignoring code duplication and promoting

  • Q : Define Java Archive file Java Archive

    Java Archive file: It is a Java Archive (JAR) file which makes it possible to store multiple bytecode files within a single file.

  • Q : Define Sign bit Sign bit : In

    Sign bit: In 2s-complement notation, the most important bit in an integer value is employed to determine the sign of the value. A 1-bit point out a negative number and a 0 bit point out a positive number.

  • Q : Define Statement Statement : The

    Statement: The fundamental building block of Java method. There are numerous different kinds of statement in Java, for example, the assignment statement, if statement, while loop and return statement.

  • Q : Explain Fully qualified class name

    Fully qualified class name: The name of a class, comprising any package name and including class name. The class outline is as follows:     package oddments;    class Outer

  • Q : Define the term Static type Define the

    Define the term Static type: It is the static type of an object is the declared type of the variable employed to refer to it.

  • Q : Define Divide and conquer Divide and

    Divide and conquer: An approach to trouble solving which attempts to decrease an overall single big trouble into multiple simpler troubles.

  • Q : Security Manager on Applets Write down

    Write down some of the restrictions imposed by using a Security Manager on Applets?

  • Q : What are the examples of microkernel

    What are the examples of microkernel?

  • Q : What are good examples of XHTML

    What are the good examples of XHTML elements along with contents?