Finastra interview question

Java question related to oops concepts.