📜  java 拆分字符串数组 - Java 代码示例

📅  最后修改于: 2022-03-11 14:52:08.405000             🧑  作者: Mango

代码示例3
Java example to split a string
String str = "A-B-C-D";
String[] strArray = str.split("-"); 
 
System.out.println(Arrays.toString(strArray));  // [A, B, C, D]