Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Why must events be associated with Java classes? Why not just use parameters or path info?

0
Posted

Why must events be associated with Java classes? Why not just use parameters or path info?

0

The advantage of using classes is that we can invoke methods based on interface name, without using reflection. If we were to try to map parameters or path info to “method” event handlers, we would have to either manually build case statements or else invoke the methods using reflection. Neither of these options is particularly desirable.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123