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

What are runtime hosts?

4 Answers   Microsoft,


what are the events raised in asp.net page life cycle?in which stage view state can be loaded?

0 Answers   EDS,


How to Insert/Add in ASPXgridview

0 Answers   Infosys,


Could u send me the answer for this question as soon as possible. Im using 'System.net.mail.mailmessage' namespace for sending a mail from my application. What should I mention in 'system.net.mail.mailmessage.to' property and What should I mention in 'system.net.mail.mailmessage.from' property.

1 Answers  


What are the major built-in objects in ASP.NET?

0 Answers   MindCracker,


How to check null values in dataset ?

6 Answers   Digital GlobalSoft,


What are the Application_Start and Session_Start subroutines used for?

5 Answers   Siebel Systems,


what is usercontrol how we can use acess the controls that are present in the usercontrol in the aspx page suppose we have 2 text boxes in a user control how u can acess the 2 textboxs in the aspx page

1 Answers  


Explain about consistent programming model in the .NET framework?

0 Answers  


What is synchronous and Asynchronous post back ?

0 Answers  


What are the best practices to follow to secure connection strings in an ASP.NET web application?

0 Answers   MCN Solutions,


How are sessions stored?

0 Answers  


Categories