How to implement language level events similar to C# in Java
问题 C# has the notion of events on a language level, using the reserved keywords event and delegate to define publisher and subscriber methods. It has been asked if Java has native support for that but the answer is obviously no. There are several alternatives, which include using AWT/Swing styled events, building my own Observer pattern or using other means of publish/subscribe. It is possible but as one answer said, "just requires a bit more legwork." In general any implementation follows the