Split text using java

I want to split this two columns on java and put the frensh words in an arraylist and the english words in an another arraylist , thanks for help

bonjour;goodmorning
bonsoir;goodevening
chat;cat
comment;how
pourquoi;why

1 réponse

  1. use

    List list = new ArrayList<String>();
    String[] result = "bonjour;goodmorning ".split(";");

    for (String string : result) {
    list.add(string);
    }