OOPS
August 25, 2024OOPS
August 25, 2024OOPS
Question 180
|
Given the array of integers ‘array’ shown below :
What is the output of the following JAVA statements ?
int [ ] p = new int [10];
int [ ] q = new int [10];
for (int k = 0; k < 10; k ++)
p[k] = array [k];
q = p;
p[4] = 20;
System.out.println (array [4] + “ : ” + q[4]);
20 : 20
|
|
18 : 18
|
|
18 : 20
|
|
20 : 18
|
Question 180 Explanation:
![](https://solutionsadda.in/wp-content/uploads/2019/06/Screenshot_617.png)
Correct Answer: C
Question 180 Explanation:
![](https://solutionsadda.in/wp-content/uploads/2019/06/Screenshot_617.png)
Subscribe
Login
0 Comments