Check out thread by Sun on why they deprecated Thread.stop(). It fits into detail on why this was a bad practice and what should be ingested to reliably stop threads in common.
Are you interested in learning Java from the basics! Refer to this video on Java provided by Intellipaat:
The method people recommend is to apply a shared variable as a flag which requires the background thread to stop. This variable can then be incubated by a distinctive object demanding the thread terminate.