Does Java have native support for events, similar to that of C#?

前端 未结 9 1997
眼角桃花
眼角桃花 2020-12-19 03:19

I\'m a bit confused from what I\'ve heard Java doesn\'t do events.

But I know that it does GUI events.

Am I missing something? Does java have an event handli

9条回答
  •  既然无缘
    2020-12-19 04:00

    From what I remember of Java (haven't worked with it in > 6 months), I don't think there are events ala .NET. Your best bet will probably be to make use of the publisher/subscriber pattern. It's pretty easy to implement and pretty reliable.

提交回复
热议问题