Object inside of Object

oop

Solution

I don't think there's any specific name for this. Although this concept is used in many different common programming constructs. For instance, when representing a graph, tree, or linked list, the nodes usually have references to other nodes that they are linked/connected to.

Problem

What is it called when an object has an object of the same type inside of itself? Example: ``` public class Foo{ public Foo myFoo; } ```

Original source