Split text using java

fadyakkar123 Messages postés 1 Statut Membre -  
irmeche Messages postés 76 Statut Membre -
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. irmeche Messages postés 76 Statut Membre 17
     
    use

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

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