how to collect objective in java

Java
private ArrayList<Mushroom> mushrooms;// Mushroom is type, mushrooms is name of collection
// here is example of collection tyoe Array list
Source

Also in Java: