How to create a thread by implementing Runnable interface?
Here is the second way for creating a thread. We create an object that implements the
java.lang.Runnable interface. For another example see How to create a thread by extending Thread class?
An example result of this code are:
Now is: 04:44:59.
Now is: 04:45:00.
Now is: 04:45:01.
Now is: 04:45:02.
Now is: 04:45:03.