Pergunta de entrevista da empresa Cognizant

Explain me how the code is executed in Java and also brief me about JDK and JRE.