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