How to implement event listener in background of the main program in java?
- by Johny
Hi im a beginner so sorry for my question if it sounds naive.
I want to implement a thread that runs in the background and listens all the time. By listening i mean, say it keeps check on a value returned from main thread and if the vaue exceeds certain figure, it executes some method, or say exits the program.
If you could give me some idea or at least refer me to something useful, that'll be great.