IFDS Group interview question

Java understanding