GoConqr has a new look! Let us know what you think.

Mind map

Arrays

Fatima Najera Rivas Spanish

Map content

Arrays

  1. Arrays are used to store multiple values in a single variable, instead of declaring separate variables for each value.

  2. In Java all arrays are dynamically allocated.

  3. Since arrays are objects in Java, we can find their length using member length.

  4. A Java array variable can also be declared like other variables with [] after the data type.

  5. The variables in the array are ordered and each have an index beginning from 0.

  6. Java array can be also be used as a static field, a local variable or a method parameter.

  7. The size of an array must be specified by an int value and not long or short.

  8. The direct superclass of an array type is Object.

  9. Array can contains primitives data types as well as objects of a class depending on the definition of array.

    • In case of primitives data types, the actual values are stored in contiguous memory locations.
    • In case of objects of a class, the actual objects are stored in heap segment.
  10. One-Dimensional Arrays : An array declaration has two components: the type and the name.

    • Type declares the element type of the array. The element type determines the data type of each element that comprises the array.
  11. Array Literal: In a situation, where the size of the array and variables of array are already known, array literals can be used.

  12. Arrays of Objects: An array of objects is created just like an array of primitive type data items in the following way.

  13. Multidimensional Arrays: Multidimensional arrays are arrays of arrays with each element of the array holding the reference of other array. These are also known as Jagged Arrays. A multidimensional array is created by appending one set of square brackets ([]) per dimension

  14. Like variables, we can also pass arrays to methods.

Information

Description
Mind Map on Arrays, created by Fatima Najera Rivas on 04/03/2019.
Views
1
Rating

Feedback

What is it about?

What do you think of the new look?

How do you like it?