展开全部
public static void main(String[] args) throws IOException {
String str = "123";
int[] inter = new int[str.length() ];
for (int i = 0; i < str.length(); i++) {
inter[i] = Integer.parseInt(String.valueOf(str.charAt(i)));
System.out.println(" " + inter[i]);
}
}
String str = "123";
int[] inter = new int[str.length() ];
for (int i = 0; i < str.length(); i++) {
inter[i] = Integer.parseInt(String.valueOf(str.charAt(i)));
System.out.println(" " + inter[i]);
}
}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询