Question: Based on the following definitions, which statement is NOT true? int[] 1DArray={1,2,3}; int[][] 2DArray=new int[2][]; 2DArray[0]={4,5}; 2DArray[1]={6,7,8}; public void method1(int[] 1DArray){...} public void method2(int number){...}
Based on the following definitions, which statement is NOT true?
int[] 1DArray={1,2,3};
int[][] 2DArray=new int[2][];
2DArray[0]={4,5};
2DArray[1]={6,7,8};
public void method1(int[] 1DArray){...}
public void method2(int number){...}
a.
2DArray[0].length == 2DArray[1].length.
b.
2DArray.length is 2.
c.
1DArray.length is 3.
d.
method2(int number) will use the pass-by-value approach to pass the actual parameter.
e.
method1(int[] 1DArray) will use the pass-by-reference approach to pass the actual parameter.
Step by Step Solution
There are 3 Steps involved in it
The detailed answer for the above question is provided bel... View full answer
Get step-by-step solutions from verified subject matter experts
