Page 1 of 1

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
by answerhappygod
Question 2 Assume That The Following Method Is Within The Kwarraylist Class What Does It Do Public Void Quizqestion In 1
Question 2 Assume That The Following Method Is Within The Kwarraylist Class What Does It Do Public Void Quizqestion In 1 (33.75 KiB) Viewed 13 times
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.