How arrays are represented in the jvm as it finds the element at index of the array, for example somewhere in the middle. She, it turns out, still goes through all array elements and finds, or some other mechanism? If so, what difference jvm - array or a linked list, why is the operation of nding an element in the middle of the array faster ?
Arrays on the JVM are quite real, that is, occupy contiguous space in memory as in C/C++, that is implemented NOT on the lists.
The operation of the access element of the array has complexity O(1), and the JIT optimizes it to a single machine instruction (on x86), that is, as well as access a local variable on the stack or field of a class.
A separate element of the array - not the same as a separate variable or field of a class, the memory that it occupies will not be freed until will not be released until the whole array.