JAVA
java
1
2
3
4
5
6
7
8
9
10
11
12
13
public class SplitFun
{
public static void main(String[] args) {
String s = "hiatozthisatozisatozaatozsplitatozmethodatozinatozstringatozclassatozusedatoztoatozsplitatoztheatozstringatozintoatozarray";
/* split takes string s and searches for atoz in string and adds rest of the string into an array */
String[] St = s.split("atoz");
for(int i=0;i<St.length;i++)
System.out.print(" "+St[i]);
}
}
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run