반응형
public class StringSplitExam {
public static void main(String[] args) {
String data = "사과!@#$%^배!@#$%^파인애플!@#$%^망고!@#$%^수박";
String delimiter = "!@#$%^";
String[] dataArr = data.split(delimiter);
for(int i=0; i<dataArr.length; i++)
System.out.println(dataArr[i]);
}
}
반응형
'BackEnd FrontEnd > JAVA' 카테고리의 다른 글
assert 함수란 (0) | 2017.07.03 |
---|---|
직렬화(serialization) 역직렬화(deserialization) (0) | 2017.06.30 |
volatile (0) | 2017.06.29 |
String, StringBuffer (0) | 2017.06.27 |
String to int (0) | 2016.11.22 |