Tech Mahindra interview question

Multithreading in java