Apexon interview question

Basic OOP related questions How to reverse a string in Java