1.

How can we remove an object from ArrayList?(a) remove() method(b) using Iterator(c) remove() method and using Iterator(d) delete() method

Answer» The correct option is (c) remove() method and using Iterator

The best explanation: There are 2 ways to remove an object from ArrayList. We can use overloaded method remove(int index) or remove(Object obj). We can also use an Iterator to remove the object.


Discussion

No Comment Found

Related InterviewSolutions