Array Archives | Programming Guide

Arrays

Arrays An array is used to store more variables into 1 variable. It starts from int[] with square brackets +variable name and the definition of the datatype(in this case: new int[length] Example: int[] vector1D = new int[5]; // create 1D Array with the size of 5 int[][] vector2D = new int[5][5] // create 2D Array with the size […]