Java – Extending Thread
One of the two ways to use a thread in Java is to extend the Thread object. It can be done like the following. Of course this is only good if you are not extending another Class. You must override the run method, and you will need to call start() to start the thread and…