标签:static ret size ali string bsp public ++ for
public class Huiwen { public boolean isPalindrome(String s) { boolean bl = true; int size = s.length()/2; for(int a=0;a<size;a++){ if(s.charAt(a) !=(s.charAt(s.length()-1-a))){ return false; } } return bl; } public static void main(String[] args) { Huiwen huiwen =new Huiwen(); System.out.println(huiwen.isPalindrome("123421")); } }
标签:static ret size ali string bsp public ++ for
原文地址:http://www.cnblogs.com/tonggc1668/p/8010674.html