public class JavaApplication {
public static void main(String args[]) {
try {
String str = "java,c,c++,php,c#,c-3po";
String arr[] = str.split(",");
for (String s : arr) {
System.out.println(s);
}
} catch (Exception e) {
System.out.println(e.toString());
}
}
}
/*
run:
java
c
c++
php
c#
c-3po
*/