Java method looping through an array?
<pre><code>public void addActor(Actor inActor) throws ActorsAndMoviesException
</code></pre>

<p>This method adds an object to the array. The green-colored text is replaced with <code>"Movie"</code> and <code>"ActorMovie"</code> appropriately. If necessary (and only if necessary), a call to this method will use extendArray to make more space. An exception will be thrown from this method if the object being added is already in the array (that is, the hasSameNameAndBirthYear (or appropriate function starting with <code>"hasSame"</code> for other types) method returns true for any object in the array), or if extendArray is called and throws an exception.</p>
