Difference between Array and ArrayList? How Array is
benifitful than ArrayList?

Answers were Sorted based on User's Feedback



Difference between Array and ArrayList? How Array is benifitful than ArrayList?..

Answer / vanitha g

1)An array can be of any data type and contain one data
type while array list can contain any data type in the form
of the object.

2)With array you can not dynamically increase or decrease
the size of array dynamically. You must the define the size
of the array. You can change the size of the array with
redim statement but still you have to define type. While
with array list you can make list of any sizes. When a
element or object is added to array list it size is
automatically increase the capacity of the array list.

Is This Answer Correct ?    27 Yes 5 No

Difference between Array and ArrayList? How Array is benifitful than ArrayList?..

Answer / bhagwat prasad sharma

1+: array is the collection of similer types of elements having same name and sharing a common data type but array list having different data types with different name .

2+: array have predefined size we can not increase or decrease the size at run time but in array list we can do it at runtime the size problem in array is a big problem but this problem solve in array list you can change the size in array list dynamacally .

Is This Answer Correct ?    13 Yes 1 No

Difference between Array and ArrayList? How Array is benifitful than ArrayList?..

Answer / bala

Array:
Fixed size and it strongly type collection so it can not use boxing and unboxing.

Arraylist:
Flexible sise and it should strongly type collection.Then it allowed to store various data type.it can use boxing and unboxing so it be slowness for comparing to array

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More ASP.NET Interview Questions

Which is faster viewdata or viewbag?

0 Answers  


How do you get records number from 5 to 15 from a dataset of 100 records?

3 Answers   Syntax Softtech,


Mention few asp.net validators.

0 Answers  


Hi, We have a user control that have button Now we use this user control on different aspx pages. We want when we click on the user control button then button behave differently on different page (Dynamacilly).

2 Answers   HCL,


What is JIT and how is works ?

1 Answers   Patni,






I have a method written in WebForm (means .aspx page) & now I want to call this method in WebUserControl (means .ascx page) what should I have to do?

1 Answers   Patni,


What are the difference between function and stored procedure in .net programming language?

0 Answers  


State management in asp.net ?

8 Answers   Accenture,


Explain client side state management system.

0 Answers  


Explain the various authentication mechanisms in asp.net.

0 Answers  


Best Institute in india for online training (Dotnet/java/Tibco/Dwh/etc.....)

4 Answers  


Rate yourself in .net and sql database?

1 Answers   BrickRed, Infosys, Satyam, SP Software,


Categories