Discuss the below:
Q: Create a class named RaceHorse that extends Thread. Each RaceHorse has a name and a run() method that displays the name 50 times. Write an application that instantiates 5 RaceHorse objects each with different names, executing in their own Thread. The last RaceHorse to finish is the loser. Save the files as RaceHorse.java and TestRaceHorse.java.