Why not post a runnable example?
Quite often, if you're using a Java special character in quotes, you need to escape it with '\'. To add to the complication, you also need to "escape the escape," so that the result is:
String[] lineSplit = line.split("\\|");
As I suggested above, here's a runnable example:
public class TestClass
{
public static void main(String[] args)
{
String line = "the|boy|is|good";
String[] lineSplit = line.split("\\|");
for ( String string : lineSplit )
{
System.out.println( string );
}
}
}