Citi interview question

Java questions