Well, actually there’s practically no application other than trivial demonstration that doesn’t use array extensively. Then all applications make use of array.
Although in some cases the array not be used directly, but within a structure with a similar function with slightly different commitments. It may be that the teacher was talking about it. Own string is a array characters. The ArrayList
is another widely used and often preferred type compared to array pure, but inside there’s a array, and this guy is still a array, only that it allows the convenience of increasing its size when it needs.
Most Java methods return a array as a result of your operation. Of course many also receive a array. And I’m talking about array even.
What is a array has already been answered. Summarizing is a way to have several variables with one name, all arranged in sequence and being accessed by an index, so there is a general name and an index of which element you are referring to.
One of the biggest advantages of a computer is to quickly compute large volumes of data. It is almost impossible to have large volumes of data other than a sequence of similar data.
Every time it is possible to have some data of the same type with the same feature fits a array.
Then you can have a list of clients, of points, of any values, of temperatures, of files, of various words, of windows, Urls, of soldiers, finally, of any object.
A database table is much like a array 2-dimensional. You have columns that by themselves are still a sequence of data and have rows with each entry in the table. But it is more common to have an object that simulates the columns and the array would be equivalent to lines.
From the array it is possible to create several sequence data structures.
In general, links are used to access and manipulate the elements of arrays.
So you and @Maniero stated that
arraylist faz uso de array internamente
I was surprised and went to see the source code. It never occurred to me that arraylist used a finite, limited, and common array to store elements, even though it was such a robust, flexible class.– user28595
@Articuno When it pops up, it creates a new larger array, copies the elements and discards the old array.
– Victor Stafusa
The class name indicates this: I am a list, but underneath it has an array
– Jefferson Quesado