字符分割,,

public class zifuchaun {
    public static void main(String[] args) {
String s="8.3 -9.4 -5.6 9.9 2.2 3.2 6.9 7.7 -2.9 -6.3 3.9 -1.4\n" +
                "-0.5 4.3 -0.3 2.3 0.7 -3.1 -6.3 5.7 -7.7 -3.7 9.7 3.8\n" +
                "5.8 -9.1 3.5 7.0 2.5 -2.3 6.9 2.7 5.8 -4.6 -7.8 4.3\n" +
                "-1.7 -8.9 -2.6 7.5 -9.6 6.4 -4.7 -8.0 0.6 6.7 -1.8 -0.4\n" +
                "-9.8 8.9 -3.8 -2.1 5.8 -9.4 1.3 6.3 -1.3 -6.3 -6.6 8.8\n" +
                "-6.3 -7.2 -6.3 -5.9 6.2 9.3 2.0 -4.3 2.7 3.6 -4.6 8.7\n" +
                "3.8 7.4 8.7 -2.8 6.0 -9.2 1.9 3.1 -7.2 -6.0 9.7 -8.4\n" +
                "-9.8 6.6 8.6 2.3 1.1 -2.9 6.6 -1.5 2.1 -5.1 6.4 -7.5\n" +
                "-0.6 -1.6 9.5 -6.6 3.0 3.4 -7.5 -7.9 3.1 2.0 1.7 -7.6\n" +
                "-9.0 9.4 6.6 -0.2 1.4 6.5 8.6 2.0 -1.3 0.2 4.0 -2.4\n" +
                "-7.3 -6.3 -8.6 -7.5 8.5 1.4 -3.3 7.1 0.8 3.3 3.0 0.1\n" +
                "3.3 9.0 1.7 5.2 -3.7 8.9 3.8 -7.4 -2.8 0.6 -2.4 7.1";
        String[] strs=s.split(" ");
        for (String e : strs) {
            System.out.println(e);
        }

    }
}

分割开来,

你可能感兴趣的:(收集收集实战,java,开发语言)