// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
public class SplitJ {
    public static void main(String[] args) {
        String s = "A\r\nBB\r\nCCC";
        String[] parts = s.split("\r\n");
        for(int i = 0; i < parts.length; i++)
        {
            System.out.println("part[" + i + "]=#" + parts[i] + "#");
        }
    }
}
