题解 | #回文数判断#
回文数判断
https://www.nowcoder.com/practice/b685d58f237c4214ada27161304a74a3
public Boolean palindromeNumber(int number) { //write your code here...... String str = String.valueOf(number); char[] ch = str.toCharArray(); boolean a1 = ch[0] == ch[4]; boolean a2 = ch[1] == ch[3]; boolean b = a1 ==true && a2==true ; return b; }