My current problem is how you can read text files with java but that contain the pipes "|" And that in each separation I get the word that is contained in them.
Code To read now:
while ((sCurrentLine = br.readLine()) != null) {
String separado[] = sCurrentLine.split("|");
for (int i = 0; i < sCurrentLine.length(); i++) {
System.out.println(separado[i]);
}
// System.out.println(sCurrentLine);
}
Text File Structure I Must Read:
Walther|28|M
Martha|28|F
Julio|28|M
The current result is:
W
a
l
t
h
e
r
|
2
8
|
M
M
a
r
t
h
a
|
2
8
|
F
J
u
l
i
o
|
2
8
|
M
I try to change the next line sCurrentLine.length()
for this line separado.lenght
But I got the following error cannot find symbol variable separado of type String[]