The currentThread() method returns a reference to the currently executing thread object.
Syntax:
Example of currentThread() method
Test it Now