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

How many types of Stored Procedures in SQL Server

4 Answers   Mind Tree,


what is the difference b/w .net 1.1 and 2.0 ?

2 Answers   Polaris,


what is use of doctype tag in asp.net

1 Answers   TCS, Wipro,


What tags do you need to add within the asp:datagrid tags to bind columns manually?

5 Answers   Siebel Systems,


How do you identify that the page is postback?

0 Answers  






i cant get Primary output selection from the Dialog box While Creating Setup and Deployment the web application how to solve it..

1 Answers  


What is side-by-side execution? Can two applications, one using a private assembly and other using a shared assembly, be stated as side-by-side executables?

0 Answers  


Any disadvantages in Dataset and in reflection ?

0 Answers   DELL, Digital GlobalSoft,


How to manage different kinds of sessions in ASP.NET?

0 Answers   Cap Gemini,


Describe the role of inetinfo.exe, aspnet_isapi.dll and aspnet_wp.exe in the page loading process

1 Answers   HCL, Siebel Systems, Visual Soft,


What is DTS package?

2 Answers   Accenture, TCS,


Why do we use sessions?

0 Answers  


Categories