Java字符串拆分 Java StringTokenizer和String Split Java检查String是否为空 Java字符串拆分 import java.io.*; public class Test { public static void main(String args[]) { String Str = new String("Welcome-to-codingdict.com"); System.out.println("Return Value :" ); for (String retval: Str.split("-")) { System.out.println(retval); } } } Java StringTokenizer和String Split Java检查String是否为空