Cognizant interview question

Coding based questions on string reversal, substrings in java