Java multidimensional arrays are treated as primitives or objects
•
Java
Yes int [] [] matrix = New Int [10] [10]; A primitive or is it considered an object? When I send it as an argument to a function, does it send its reference (such as an object) or its value (such as a primitive)?
Solution
Each Java array is an object When passed as a parameter, a copy of the reference is passed to the array
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码