Broadridge interview question

String manipulation and Java basic conecpts