Iterator constraints oContainer.iterator()returns you an Iterator, which is ready to return the first element in the sequence on your first call to next() ●( Get the next object in the sequence with next() ● Set there are more objects in the sequence with hasNext() o Remove the last element returned by the iterator with remove() Example:revisit CatsAndDogs.javaIterator constraints l Container.iterator() returns you an Iterator, which is ready to return the first element in the sequence on your first call to next() l Get the next object in the sequence with next() l Set there are more objects in the sequence with hasNext() l Remove the last element returned by the iterator with remove() l Example: revisit CatsAndDogs.java