Ask Question
6 May, 23:01

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. 6 May, 23:17
    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?
Find 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 and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers