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)?
Is int[][] matrix = new int[10][10]; a primitive or is it considered an object?
Share
Every Java array is an Object. When you pass it as an argument, you pass a copy of the reference to the array.