Is int[][] matrix = new int[10][10]; a primitive or is it considered an object? When i send it as a parameter to a function, does it send its reference (like an object) or its value (like a primitive)?
Every Java array is an Object. When you pass it as an argument, you pass a copy of the reference to the array.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With