Built in Data Types

<aside> 💡 Create a hierarchy of abstract interfaces and concrete implementations → Collection

</aside>

The Collection Interface

public interface Collection<E>{
	boolean add(E element);
	Iterator<E> iterator();
	...
}

<aside> 💡 Java later added for each loop → Implicitly creates an iterator and runs through it.

</aside>

Collection<String> cstr = new .... ;
for(String element : cstr){
	// do something with element
}


Removing Elements