How can I split a string in Java?
        Posted  
        
            by Sergio Tapia
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Sergio Tapia
        
        
        
        Published on 2010-05-25T17:47:16Z
        Indexed on 
            2010/05/25
            17:51 UTC
        
        
        Read the original article
        Hit count: 706
        
Imagine I have this string:
string thing = "sergio|tapia|gutierrez|21|Boston";
In C# I could go:
string[] Words = thing.Split('|');
Is there something similar in Java? I could use Substring and indexOf methods but it is horribly convoluted. I don't want that.
© Stack Overflow or respective owner