Cognizant interview question

Mostly core Java and threading