Answers for "possible palindrome integer in java"


palindrome in java

package test
//The function below checks if a string is a palindrome
//True = Is a palindrome & False = Not a palindrome
	public boolean isPalindromString(String text){
    	String reverse = reverse(text);
        	return true;
      	return false;
//This function returns the reverse String of its input.
//Ex. if given "hello", it will return "olleh"
	public String reverse(String input)
		if(input == null || input.isEmpty())
			return input;
return input.charAt(input.length()- 1) + reverse
                         (input.substring(0, input.length() - 1));
Posted by: Guest on January-14-2021

Code answers related to "possible palindrome integer in java"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language