I am curious to know if it is possible to modify the run method of main thread like in other threads we override the run method and define the desired behaviour.
Also may I know if the code we write in main method actually gets added to the run method of main thread coz this is what gets executed when the main thread runs.
Usually, the main method is not used during the whole application life. You just use it to initialize and run other threads and then let it terminate:
So you can directly control the
run()method of the started threads.