Take these two Java classes:
class User { final Inventory inventory; User (Inventory inv) { inventory = inv; } } class Inventory { final User
You can do it if you don't need to inject one of the objects.
class User { private final Inventory inventory; User () { inventory = new Inventory(this); } }