Numerator interview question

Java and spring boot question