10 lines
236 B
Java
10 lines
236 B
Java
|
|
public static boolean rPali(String testMe){
|
||
|
|
if(testMe.length()<=1){
|
||
|
|
return true;
|
||
|
|
}
|
||
|
|
if(!(testMe.charAt(0)+"").equals(testMe.charAt(testMe.length()-1)+"")){
|
||
|
|
return false;
|
||
|
|
}
|
||
|
|
return rPali(testMe.substring(1, testMe.length()-1));
|
||
|
|
}
|