Synechron interview question

Java technical