Incedo interview question

Reverse a string in java