an A object contains a B object, which contains a C object, which in turn contains a D object. I need to access the "name" property of the D object starting from the A object.
Currently, I'm doing it like this:
Код: Выделить всё
a.getB().getC().getD().getName();Any examples or recommendations would be greatly appreciated.
Источник: https://stackoverflow.com/questions/781 ... -clean-way
Мобильная версия