String .split()方法
package leixifeng; import java.util.Arrays; import java.util.Scanner; public class Email { public static void main(String[] args) { // TODO Auto-generated method stub String str = "长亭外 古道边 芳草碧连天 晚风扶 柳笛声残 夕阳山外山"; System.out.println(str); String[] arr = str.split(" "); for( int i = 0 ; i < arr.length; i++){ System.out.println(arr[i]); } }