I've been looking into the topic of creating instances of a class within its own definition. Something like this:
public class myClass
{
public static myClass aObject = new myClass();
public static myClass bObject = new myClass();
}
I kind-of understand how this is possible, but I'm confused as to why it would be useful.
Also, my logic says that it should be possible to do something like this:
aObject.bObject.someMethod();
aObject is an instance of myClass, so it should contain bObject, right? I feel like I'm missing some fundamental understanding of how classes work, so I would really like to know what's going on here, and why someone would want to do this.