Nok Nok Labs Interview Question

Java basic question