Scanner输入数字时个位十位百位千位单独取出。
Scanner inn = new Scanner(System.in);
int i = inn.nextInt();
System.out.println("个位是"+i%10+"十位是"+i/10%10+"百位是"+i/100%10+"千位是"+i/1000%10);
Scanner inn = new Scanner(System.in);
String s = inn.next();
for (int i=0;i<s.length();i++){
String str1= s.substring(i,i+1);
System.out.println(str1);}