OCJP Exam watch tip #16

Capture

The Collection interface provides methods such as add() and remove() that are common to all containers. Below table  lists the most important methods in this interface. Take a look at them before you use them.

Capture

Methods such as add() and remove() can fail depending on the underlying container. For example, if the container is read-only, you will not be able to add or remove elements

Leave a comment