QUESTION 2 Assume that the following method is within the KWArrayList class, what does it do: public void quizQestion(in
Posted: Tue Jul 05, 2022 10:27 am
QUESTION 2 Assume that the following method is within the KWArrayList class, what does it do: public void quizQestion(int loc) { if (loc < 0 || loc > size) return; E temp; for (int i = loc; i < size -1; i++) if ( the Data <the Data[i+1]) { temp = theData[i+1]; the Data[i+1] = theData; theData = temp; } a. Swap every two consecutive elements of the whole list. O b. Makes the smallest element starting from loc as the last element in the list. O c. Swap every two consecutive elements starting from loc in the list. d. Makes the smallest element starting from loc to be before the last element in the list.