What are the applications of arrays in the day to day? (examples of its usability)

I did an internet search on the use of arrays and found many results aimed at creating games only... But other than this example, where else do I use arrays (arrays) in everyday life (application development for example)?

I have this doubt because the Apostille used in my java discipline in college addresses in a summary way the arrays and questioning my teacher about the reason he told me that it is not very usual this structure on the day a day ("it is not the focus of java" and you will see why when we study database")...

But curiosity still stayed.

Author: Arcano Maroto, 2017-10-28

2 answers

Arrays are used widely in the Java language. Even String s are implemented by means of arrays. There are several methods in JDK in several classes that create or consume arrays of various types.

However, it is true that working directly with arrays has its drawbacks. It is often a good idea to use more flexible abstractions such as ArrayList (which uses an array internally).

 6
Author: Victor Stafusa, 2017-10-28 18:38:44

Well, in fact there is practically no application other than trivial demo that does not use array extensively. So all applications make use of array .

Although in some cases the array is not used directly, but within a structure with similar function with slightly different commitments. Maybe the teacher was talking about this. The String itself is a array characters. O ArrayList it's another very used and often preferred type compared to the pure array, but inside it has a array, and this type is still a array, only it allows the convenience of increasing its size when you need it.

Most Java methods return a array as a result of their operation. Of course many also get a array. And I'm talking about the array Pure same.

What is a array has already been answered . Summing up is a way of having multiple variables with a single name, all arranged in sequence and being accessed by an index, so there is a general name and an index of which element is referring.

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 characteristic 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 very similar to a 2-dimensional array. You have columns that by themselves are still a sequence of data and you 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 rows.

From the array you can create multiple sequence data structures.

In general, loops are used to access and manipulate elements of arrays.

 5
Author: Maniero, 2020-12-15 21:41:32