📅  最后修改于: 2022-03-11 14:52:35.885000             🧑  作者: Mango
int num = 5542;
String number = String.valueOf(num);
for(int i = 0; i < number.length(); i++) {
int j = Character.digit(number.charAt(i), 10);
System.out.println("digit: " + j);
}