Cognizant interview question

What is compiler and interpreter in java