check if thread has finished java code example Example: java check if thread is running Thread.isAlive()