Ask Question
27 May, 21:16

The following statement creates alpha to be a two-dimensional array of 35 components.

int[][] alpha = new int[20][15];

A) True

B) False

+2
Answers (1)
  1. 27 May, 23:45
    0
    B) False.

    Explanation:

    int[][] alpha = new int[20][15];

    This statement will create and array with 20 rows and 15 columns. So the number of elements this array can accommodate is 20*15=300. So this array can hold more than 35 elements so the statement is false.

    To have an array which can hold 35 we need an array of 7 rows and 5 columns or with 5 rows or 7 columns.

    int [][] alpha = new int[7][5];

    or int [][] alpha = new int[5][7];
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “The following statement creates alpha to be a two-dimensional array of 35 components. int[][] alpha = new int[20][15]; A) True B) False ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers