Pregunta de entrevista de DXC Technology

basic java question along with oops and code snippets