

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


Name: Panther ID: Please use 10 minutes to finish this quiz.
Bonus [5pts] Write a method called switchThem that accepts two integer arrays as parameters and switches the contents of the arrays. Take into account that the arrays may be of different sizes. public static void switchThem(int [] nums1, int [] nums2) { int length = 0; if(nums1.length > nums2.length) length = nums2.length; else length = nums1.length; for(int i=0, temp=0; i<length; i++) { temp = nums1[i]; nums1[i] = nums2[i]; nums2[i] = temp; } }