I haven't created a
thread myself since I was in school and we're learned about the concept.
Now I need to create a couple of threads myself in an application cause some actions need to be performed asynchronously, so I was reading up on the concept.
If I got it right you need to extend the Threadclass or implement the runnable interface and overwrite the run method, which is being executed once the thread is being started.
That way I need to create a seperate class or interfaceimplementation for each action that might be needed.
Isn't there a simple way, like simply returning the thread an overwrite the run method on the spot, instead of hardcoding it?