본문 바로가기

IT칼럼/JAVA

isPalindrome

most simplest code for isPalindrome function in Java


public boolean isPalindrome(String text){

StringBuffer sb = new StringBuffer(text);

return sb.reverse().toString().equls(text);

}