Cognizant interview question

Multithreading Garbage collection Program to swap two numbers C and Java