I know how to code with Java listeners but I have one understanding ask:
Is there a loop in every listener which listen to something until the event is happening. I searched for source codes and found the implementation of some java key event listeners but naturally there are many native functions I don't understand as a beginner .
If you could explain me the principle of a listener like a simple key listener I would be very happy.
Ps: I tried to find an existing explanation but I found none explaining the principle and whether there is always a loop in the background.
Edit: I want to know how it works. Whether with polling mechanism (loop) or by using interrupts or something
ThX a lot