Delete comment from: Java67
javin paul said...
Hello xyz, this is recursion which is best explained as an example, support you need to reverse the string "ANY" you past this to method and then it will expand as below
input.charAt(input.length()- 1) will return "Y" + reverse ("AN")
in next round it will be "Y" + "N" + reverse ("A")
and this time reverse will return "A" and you will have output as "YNA"
May 11, 2020, 8:52:37 AM
Posted to How to check is given String is a Palindrome in Java using Recursion