Line 4 is calling the Thread constructor that takes a Runnable parameter. The Javadoc for this constructor shows it creates a Thread object that will delegate to the parameter's class when start/run are called.
But I still have one confusion. why we use super() here? As it is used to call superclass method, and is that is the case superclass, in this case "Thread" , its run() should be called which will do nothing.
Am I right?
author & internet detective
But as a cool note, this calls the delegated Runnable via super.run() in addition to the current thread. So it makes sense - if you override run and mask the default behavior, it no longer delegates to the runnable. If you keep the superclass' run via calling it from your run, the logical behavior is still there.