Splunk interview question

Reverse a string & find max of array in java