OOPS
August 25, 2024
OOPS
August 25, 2024
OOPS
August 25, 2024
OOPS
August 25, 2024

OOPS

Question 116
Which of the following java statement declare and allocate a 2-dimensional array integers with four rows and five columns?
A
int array[ ] [ ]=new int [5][4];
B
int array [4][5];
C
int array[5][4];
D
int array[ ] [ ]=new int[4][5];
Question 116 Explanation: 
→ In question they are clearly mentioned that 4 rows and 5 columns.
→ ​ Syntax int array[ ] [ ]=new int[row size][column size];
(or)
int[ ] [ ] array=new int[row size][column size];
So, Option D is correct answer.
Correct Answer: D
Question 116 Explanation: 
→ In question they are clearly mentioned that 4 rows and 5 columns.
→ ​ Syntax int array[ ] [ ]=new int[row size][column size];
(or)
int[ ] [ ] array=new int[row size][column size];
So, Option D is correct answer.
0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
error: Alert: Content selection is disabled!!