Reverse String/array recursively

Here is an example how to recursively invert the order of a string or an array in Java.

The output is:

output

Notice that in the string method we have twice the iterations that we have in the array method, because we go through all positions in the string.

If you know other ways of doing it, please feel free to comment it out.

Thanks.