{name = n; cpr QUESTION 2 Assume you have a method (shown below) inside the KWArrayList class, what does this method do public boolean test( E item) { for (int j = 0; j< size; j++) { if (item.equals(theData[j]) return false; } the Data[size] = item; size++; return true; } O a. Remove all occurrences of item from the list. O b. Remove the first occurrence of item from the list. Oc Add an item to the end of the list, if it does not exist in the list. Od. Add item to the beginning of the list, if the item does not exit in the list.
please solve fast 🙏🏼
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
please solve fast 🙏🏼
please solve fast 
{name = n; cpr QUESTION 2 Assume you have a method (shown below) inside the KWArrayList class, what does this method do public boolean test( E item) { for (int j = 0; j< size; j++) { if (item.equals(theData[j]) return false; } the Data[size] = item; size++; return true; } O a. Remove all occurrences of item from the list. O b. Remove the first occurrence of item from the list. Oc Add an item to the end of the list, if it does not exist in the list. Od. Add item to the beginning of the list, if the item does not exit in the list.
{name = n; cpr QUESTION 2 Assume you have a method (shown below) inside the KWArrayList class, what does this method do public boolean test( E item) { for (int j = 0; j< size; j++) { if (item.equals(theData[j]) return false; } the Data[size] = item; size++; return true; } O a. Remove all occurrences of item from the list. O b. Remove the first occurrence of item from the list. Oc Add an item to the end of the list, if it does not exist in the list. Od. Add item to the beginning of the list, if the item does not exit in the list.