In Java, there are two ways to create a new thread of execution. One is to declare a class inheriting java.lang.Thread and overriding the method run(). The other way is to create a class implementing java.lang.Runnable and passing it to a new instance