+ 2
What are arrays ?
2 Answers
+ 1
I'll try to explain it as simple as possible. (Hopefully I'm right) It's a list of values. Like instead of saying
a = "smth"
you do
a = ['smth0', 'smth1', 'smth2']
and then you access them like so
x = a[0]
In this case you assign a[0] which is 'smth0' to x
Remember that arrays start from 0 and not 1!
Edit: Example is written in Python.
0
In java array is acollection of similar types of data with continous memory allocation. Java array is an object which contains elements of similar datatypes.