Threshold interview question

Basic java questions