Why are inner classes used for event listeners Is it possibl
Why are inner classes used for event listeners? Is it possible to create event listeners if If Java did not have inner classes? If so, how?
Solution
We frequently use inner classes for event listeners since they have ready admittance to variables in the program that they usage.
If Java didn\'t deliver the competence for inner classes, we might still implement listeners as distinct classes.
We did just have to pass in parameter references to wanted information so that the event listener might use them as wanted.
