Options:
1)
if(threadOne != null) {
Thread temp = threadOne;
threadOne = null;
temp.interrupt();
}
2)
Declare threads as Daemon threads.
threadOne.setDaemon(true);
threadOne.start();
1)
if(threadOne != null) {
Thread temp = threadOne;
threadOne = null;
temp.interrupt();
}
2)
Declare threads as Daemon threads.
threadOne.setDaemon(true);
threadOne.start();