public static void main(String[] args) {
// TODO Auto-generated method stub System.out.println("请输入一串字符串"); System.out.println("最后一个以0作为结束"); Scanner reader=new Scanner(System.in); int x=(int)reader.nextInt(); while(x!=0){ System.out.println(x); x=(int)reader.nextInt(); } }
public class Test {
public static void main(String[] args) { String str = "12ljfs92"; String[] ss = str.split(""); for(int i = 0; i < ss.length; i++){ System.out.print(ss[i] + " "); } } }1 2 l j f s 9 2