Canva interview question

Basic logic and theory of Java