Accenture interview question

thread handling in java