Loop Health interview question

Java