What is the difference between arrays and collection?

  • : 357
  • : 10
    Previous Next

    You need to specify the size of an array at the time of its declaration. It cannot be resized dynamically.
    The members of an array should be of the same data type.

    The size of a collection can be adjusted dynamically, as per the user's requirement. It does not have fixed size.
    Collection can have elements of different types.

    you can suggest other answer in comment box

  • Exam: OOPS Interview QUESTIONS

    Subscribe here for free mock test on IAS PCS SSC and other competitive exam. Signup here to get SSC CGL Solution and main exam study material