<aside> 💡 Architecture that allows us to manipulate a group of objects

</aside>


Iterable

It's part of the 'java.lang' package and not 'java.util' like the rest of the class.

It represents iterable objects, meaning those that can be traversed by a loop, like an ArrayList. It defines a single method, 'iterator()', which is used to enable iteration of its objects. The primary use is to allow the 'for-each' loop.

Often, you won't need to implement it directly in your code, as the main classes of Collections already implement it for you.

for (int num : nums){
	System.out.println(num);
}

Interface

Implemented by all of its frameworks subclasses. Used as a guide for what each subclass must have - standardisation.


Hierarchy

Untitled


Classes

List

Stack

Queue