Hi, Can anyone help me out with this ? Which of these methods from the Collection interface return the value true if the collection object was actually modified by the call? a. add() b. retainAll() c. containsAll() d. contains() e. remove()
Thx in advance. Aruna
chetan nain
Ranch Hand
Joined: Jun 21, 2000
Posts: 159
posted
0
answer: add(), retain(), retainAll(), and remove() although contains() and containsAll() also return a boolean value, the point to remember here is that the question asks for methods that return true AFTER modification HTH chetan
Ada Wang
Greenhorn
Joined: Aug 28, 2000
Posts: 23
posted
0
add() - Returns true if this collection changed as a result of the call. retainAll() - Return true if this collection changed as a result of the call contains() - Returns true if this collection contains the specified element containsAll() - Returns true if this collection contains all of the elements in the specified collection. remove() - Returns true if this collection changed as a result of the call Ada