how to check a thread is still running java code example Example: java check if thread is running Thread.isAlive()