Array

Description

Computer Science Mind Map on Array, created by Tate Johnson on 27/04/2021.
Tate Johnson
Mind Map by Tate Johnson, updated more than 1 year ago
Tate Johnson
Created by Tate Johnson about 3 years ago
34
0

Resource summary

Array
  1. Very similar to dictionaries in Python
    1. The size of an array can't be change
    2. How to declare/instantiate: elementType[] varName = new elementType[arraySize];
      1. Example:String[] stringHolder = new String[5]
        1. Setting the values of an array: varName[index] = value;
          1. Checking the length: varName.length (no parentheses)
            1. Can also initialize it like this: String[] stringHolder = {value1, value2, value3}
            2. Indexing through an array: for-each loop
              1. Example: for(elementType element: nameofArray)
                1. for(double d1: stringHolder)
              2. Two Dimensional Arrays
                1. Declare: int[][] array2d;
                  1. array2d = new int[3][10]
                2. Copying Arrays:
                  1. Use a loop to copy the individual elements
                    1. use static arraycopy method in System class
                      1. arraycopy(sourceArray, sourcePosition, targetArray, targetPosition, length)
                      2. Use clone method to copy arrays.
                      Show full summary Hide full summary

                      Similar

                      Computing Hardware - CPU and Memory
                      ollietablet123
                      SFDC App Builder 2
                      Parker Webb-Mitchell
                      Data Types
                      Jacob Sedore
                      Intake7 BIM L1
                      Stanley Chia
                      Software Processes
                      Nurul Aiman Abdu
                      Design Patterns
                      Erica Solum
                      CCNA Answers – CCNA Exam
                      Abdul Demir
                      Abstraction
                      Shannon Anderson-Rush
                      Spyware
                      Sam2
                      HTTPS explained with Carrier Pigeons
                      Shannon Anderson-Rush
                      Data Analytics
                      anelvr