Bluebeam interview question

Medium LC string question and Java fundamentals.