Blue Yonder interview question

basic java