Terms from computer science:
You can imagine list like as string of pearls. They are connected with thread. If you got one you can go by thread to the other one next to it.
An array is like a meter. You know where you are so you can jump any amount of units around.
An (non generic) arrayList in java can save any type of object (in this case your class variable) in this straightforward way: MyClass myClassVar = new MyClass(); ArrayList myArrayList = new ArrayList(); myArrayList.add(myClassVar);
Array's can hold only primitive data types. if you want a collection of objects you must use an ArrayList or a Vector.
Array Lists and Arrays can be compared to one another. Actually an Array List is nothing but a growable array that provides us with a lot more features than traditional Arrays. Apart from this - they are both same - used to hold a group of java objects.
Linked list consists of data nodes each pointing to next in the list .An array consist of contiguous chunk memory of predetermined size
The requirements to download a java arraylist are a pc with java software installed. A java arraylist is used to store a group of elements in a specific order.
The biggest advantage of an ArrayList is that it can expand in size to fit more data. So, if you don't know how many data values you are going to have, you can construct an ArrayList. Whenever you use the add() method, the object will be added to the ArrayList, regardless of the current size. An Array does not have this advantage. When you construct an Array of size n, the array will always be that size.
An array is a fixed-length chunk of memory. Once you've created an array, you can't change its length. This can be a problem. So we have ArrayList. This is a data structure backed by an array. You can add/remove/insert elements whenever and wherever you want and the code behind the scenes will take care of resizing the array for you.
An (non generic) arrayList in java can save any type of object (in this case your class variable) in this straightforward way: MyClass myClassVar = new MyClass(); ArrayList myArrayList = new ArrayList(); myArrayList.add(myClassVar);
Array's can hold only primitive data types. if you want a collection of objects you must use an ArrayList or a Vector.
No, but an arraylist or almost any other list abstraction can
Numeric array has numbers(+integers) that represent the values Associative array has strings that represent the values
When we declare an array of characters it has to be terminated by the NULL , but termination by NULL in case of string is automatic.
You can also use the Collections.sort() method to sort values in an array list. You can also use the Comparable Interface or Comparators for providing custom implementations of sorting algorithms for values inside an ArrayList.
Vectors are thread safe but array lists are not. Hence array lists are faster than Vectors.
The minimum absolute difference between any two elements in a given array is the smallest positive number that can be obtained by subtracting one element from another in the array.
If im sending the answer if correct means u can accept otherwise any comments reply me. My mail is is murugadoit@gmail.com i know the answer is JVM is platform dependent, but Java is platform independent. Array is faster execution then ArrayList. Array is similar to pointer. You can store the values in index based. So you can easily store the data and also rectify the datas. So Array is faster then ArrayList but both are working datastructure in internally.
A Magician has a cunning array of stunts ...........................................................................