Skip to content

Latest commit

 

History

History
49 lines (44 loc) · 758 Bytes

TestData.md

File metadata and controls

49 lines (44 loc) · 758 Bytes

Arrays

// Integer 1D array
int[] intArray1D = {1, 2, 3, 4, 5};

// Char 1D array
char[] charArray1D = {'a', 'b', 'c', 'd', 'e'};

// Integer 2D array
int[][] intArray2D = {
    {1, 2, 3},
    {4, 5, 6},
    {7, 8, 9}
};

// Char 2D array
char[][] charArray2D = {
    {'a', 'b', 'c'},
    {'d', 'e', 'f'},
    {'g', 'h', 'i'}
};

// Integer 3D array
int[][][] intArray3D = {
    {
        {1, 2, 3},
        {4, 5, 6},
        {7, 8, 9}
    },
    {
        {10, 11, 12},
        {13, 14, 15},
        {16, 17, 18}
    }
};

// Char 3D array
char[][][] charArray3D = {
    {
        {'a', 'b', 'c'},
        {'d', 'e', 'f'},
        {'g', 'h', 'i'}
    },
    {
        {'j', 'k', 'l'},
        {'m', 'n', 'o'},
        {'p', 'q', 'r'}
    }
};