Click here to Skip to main content
15,895,746 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Which two statements are true for a two-dimensional array of primitive data type?
A. It cannot contain elements of different types.
B. The length of each dimension must be the same.
C. At the declaration time, the number of elements of the array in each dimension must be specified.
D. All methods of the class object may be invoked on the two-dimensional array.


What I have tried:

answer:
A and D

Could anyone explain why D is the correct option?
Posted
Updated 6-Mar-21 2:32am

1 solution

Because it doesn't matter where the element comes from: once you have the instance you can do anything that the class permits with it.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900