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 : Explain While loop While loop: It is

    While loop: It is one of Java's three control structures employed for looping. The other two are: do loop and for loop. The while loop comprises of a Boolean expression and a loop body. The condition is tested prior to the loop body is entered for the

  • Q : Define Accessor method Accessor method

    Accessor method: A technique specifically designed to offer access to a private attribute of a class. By convention, we name accessors with a get prefix followed by the name of the attribute being accessed. For example, the accessor for an attribute n

  • Q : How Does Run time data handled into QTP

    How Does Run time data i.e. Parameterization is handled within QTP?

  • Q : Explain Functional programming

    Functional programming: It is a style of programming related with languages like Haskell. The functional programming languages are more strongly tied to a mathematical concept of `function' than imperative programming languages. This makes it simpler

  • Q : Explain UpdatePanel control Briefly

    Briefly explain about the UpdatePanel control.

  • Q : CORBA allows high performance

    'CORBA was designed to allow high performance distributed applications to be written’. Discuss. Definitely, ’CORBA was designed to allow high performance distributed applications to be written’ because it provides:

  • Q : Create an applet of bounces in JAVA

    Create an applet that bounces a blue ball inside an applet using Thread.  The ball (diameter is 10) will start at position (0,0).  When the ball hits the edge of the applet, the ball should bounce off the edge at a randomly selected angle between 20 and 60 d

  • Q : Define the term Binary Binary : This is

    Binary: This is the number representation in base 2. In base 2, only digits 0 and 1 are utilized. Digit positions symbolize successive powers of 2.

  • Q : What is an Overriding for chaining

    Overriding for chaining: It is a form of method overriding in which the sub-class version of a method verifies to see whether it can react to the message on its own and just calls the super-class version of the method.

  • Q : State the term multi programming State

    State the term multi programming.

©TutorsGlobe All rights reserved 2022-2023.