Question: Suppose that a[] and b[] are both integer arrays consisting of millions of integers. What does the following code do, and how long does it
Suppose that a[] and b[] are both integer arrays consisting of millions of integers. What does the following code do, and how long does it take?
int[] temp = a; a = b; b = temp;
Step by Step Solution
3.60 Rating (146 Votes )
There are 3 Steps involved in it
The code youve provided is swapping the references of two integer arrays a and b Lets break it down ... View full answer
Get step-by-step solutions from verified subject matter experts
