COMPUTER SCIENCE AND ENGINEERING
DATA STRUCTURES
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
|
int[8][10] popcorn;
|
|
int[8][10] popcorn = new int[8][10];
|
|
int[][] popcorn = new int[8][10];
|
|
int[8][10] popcorn = new int[][];
|
|
int[][] popcorn = new int[][](8, 10);
|
Detailed explanation-1: -Answer. The right approach to create and assign a 2d array with 8 rows and 10 columns to the variable popcorn is int[][] popcorn = new int[8][10].
Detailed explanation-2: -int[][] table = 1, 0, 1, 5, 3, 8 ; Which is the correct way to construct and assign a 2D array, with 8 rows, to popcorn, but does not have the rows constructed yet? int[][] popcorn = new int[8][]; We want to create a 2D double array with 6 rows and 7 columns and assign it to connectFour.
Detailed explanation-3: -What is the proper syntax to initialize an empty 6x6 2D String array? String[ ][ ] array = new String[6][6];
Detailed explanation-4: -The array must have been sorted in ascending order. Which of the following is a requirement when you use a binary search method with an array?
Detailed explanation-5: -There are 11 methods in Object class . Checks whether the obj object is equal to the object on which the equals method is called .