Answer:
public class CheckPalindrome{ 
 
public static boolean IsPalindrome(String str){ 
 
if(str.Length<1) 
 
{ 
 
return true; 
 
} 
 
else 
 
{ 
 
if(str[0]!=str[str.length-1]) 
 
return false; 
 
else 
 
return IsPalindrome(str.substring(1,str.Length-2)); 
 
} 
 
} 
 
public static void main(string args[]) 
 
{ 
 
//console.write("checking palindromes"); 
 
string input; 
 
boolean flag; 
 
input=Console.ReadLine(); 
 
flag= IsPalindrome(input); 
 
if(flag) 
 
{ 
 
Console.WriteLine("Received"+input+"is indeed palindrome"); 
 
} 
 
else 
 
{ 
 
Console.WriteLine("received"+input+"is not a palindrome"); 
 
} 
 
}
Step-by-step explanation: