Already gone through How to split a string in Java
I have string str = "He|is|a|very|very|good|boy||isn|t|he|"; and want to split on the basis "|". But split function not working...
{
String[] sa = sr.split("|");
for(String s1 : sa){
System.out.println(s1);
}
}
Getting output ..
H
e
|
i
s
|
a
|
v
e
r
y
|
v
e
r
y
|
g
o
o
d
|
b
o
y
|
|
i
s
n
|
t
|
h
e
|