Avoiding recursion in toString method
问题 this is my huge mindblowing problem with a Java exercise. So, we've got this: public class CyclicEmployee { private int age; private String name; private CyclicEmployee boss; private List<CyclicEmployee> subordinate } and our goal is to overwrite toString method by cutting fields which may lead to recursive infinity. Finally it's supposed to look like a printed object with a name, age, boss and subordinate. Employee[age=30,name='Mike',boss=Employee[age=45,name='Ann'], subordinate=[Employee