Pregunta de entrevista de Finastra

Java question related to oops concepts.