This type of class structure is not in a loop. The instance member temp is assigned a value null. It has to be explicitly set to a new EmpInfo object whose member temp will in turn be null.
This
pattern is typically used to create a Linked List.
On the other hand,
Class EmpInfo {
private EmpInfo e = new EmpInfo();
}
will be a loop because when we create an instance of this class, there will be a recursive creation of objects that results in a stack overflow error.