Pregunta de entrevista de Tata Consultancy Services

Basic question regarding java and it was not much very difficult