Skip to main content
1 of 4

#Java

Straight from XKCD

Bonding

It's a never-ending game of catch between a parent and child!

The target of CHILD is set to PARENT and the target of PARENT is the CHILD. When the PARENT calls AIM, it throws the instance of the BALL class and it is caught by the catch statement. The catch statement then calls PARENT.TARGET.AIM where the target is the CHILD. The CHILD instance does the same and "throws the ball back" to the parent.