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

0

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

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

But the curiosity still remains.

    
asked by anonymous 28.10.2017 / 20:27

2 answers

6

Arrays are used extensively in the Java language. Even String s are implemented by means of arrays. There are several methods in the 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).

    
28.10.2017 / 20:38
5

Well, there's virtually no application beyond trivial demonstration that does not use array extensively. Then all applications make use of array .

Although in some cases array is not used directly, but rather within a framework with a similar function with slightly different appointments. Maybe the teacher was talking about it. The string itself is an array character. ArrayList is another widely used and often preferred type to the pure array , but inside it has an array , and this type is still an array , but allows the convenience of increasing its size when needed.

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

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

One of the greatest advantages of a computer is to compute large volumes of data fast. It is almost impossible to have large volumes of data other than a sequence of similar data.

So you can have a list of clients, points, any values, temperatures, files, miscellaneous words, windows, URLs, soldiers, in short, any object.

A database table is very similar to a 2-dimensional array . You have columns that by itself is still a data stream and has rows with each entry in the table. But it is more common to have an object that simulates the columns and array would be equivalent to the lines.

From the array it is possible to create several data structures sequences.

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

    
28.10.2017 / 20:42