How to create Thread using runnable interface in java !

How to create Thread using runnable interface in java !

In a previous video we inherited from the Thread class to create a secondary thread for your Java application. There is another approach when creating threads. We can create a custom class that implements an interface called Runnable. I will demonstrate this using the project Runnable Thread, which has a Main class and a custom class that implements runnable interface. It will have the same run method as when you extend the Thread class as a super class.