Reverse String Leetcode Solution In Java