regarding Array and ArrayList

Hi all,if any body knows the difference between Array and Array List Conceptually tell me the differences..Thanks ,Naveen
[149 byte] By [nagavenkatanaveenkumara] at [2007-11-26 18:53:48]
# 1

An array is a less dynamic structure than an ArrayList. An array gets a fixed size once it's created. It's memory is allocated upon creation, generally these are sequential memory locations.

An ArrayList provides the same features as an Array: you can acces the contents by index. It add the features of a List to it: getting the head, traversing contents, inserting, appending... It also can grow in size dynamically. This is done by giving each element in an ArrayList a reference to the next element. This allows the elements to be stored throughout the available memory.

Peetzorea at 2007-7-9 6:27:50 > top of Java-index,Core,Core APIs...
# 2
hai thanks for ur reply.but there is java.lang.reflect.Array andArrayList wat is the diff between these two things,,
nagavenkatanaveenkumara at 2007-7-9 6:27:50 > top of Java-index,Core,Core APIs...
# 3

> but there is

> java.lang.reflect.Array

Form the java docs: "The Array class provides static methods to dynamically create and access Java arrays"

You must have noticed that this Array class is final and has all methods as static and public. Basically this is an utility class which supports manipulating arrays of objects reflectively.

-BJ

Message was edited by:

Bimalesh

Bimalesha at 2007-7-9 6:27:50 > top of Java-index,Core,Core APIs...
# 4
thanks for ur reply..RegardsNaveen Kumar
nagavenkatanaveenkumara at 2007-7-9 6:27:50 > top of Java-index,Core,Core APIs...