How can an instance communicate with its instantiator?
问题 Given a really oversimplified example: Class A { B b = new B(); } Class B { //unicorns and what-not //Something happens and I want to let A know //Yet I don't want to return and exit } Is there any way that B can communicate with A without Sockets? By communicate, I mean B sending values to A without A invoking a method on B. EDIT : Thank you for your responses. This following is my follow up question: If I had the following, and method signal() is called simultaneously by 2 instances of B,