Answers for "write java program check whether the string is palindrome or not?"

1

is palindrome java

public static boolean checkPalindrome(String str)
{     
 
    int len = str.length();

    for(int i = 0; i < len / 2; i++)  {
        if (str.charAt(i) != str.charAt(len - i - 1))
            return false;
    }
    return true;
}
Posted by: Guest on September-28-2021

Code answers related to "write java program check whether the string is palindrome or not?"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language