Question: Hello, I want to read a file, file.txt that contains word pairs like this... 

```
mot;word 
oui;yes
utiliser;use
comment;how

```

After reading this file.txt , I want to split this text and put the French words in an ArrayList and the English words in an another ArrayList.

Thanks in advance...

Answer: 
First, you have to create two array lists..

```
    ArrayList<String> english = new ArrayList<>();
    ArrayList<String> french = new ArrayList<>();

```

Then, open the file, read line by line, split it bye ";" and add the words to ArrayLists...

```
    try(BufferedReader in = new BufferedReader(new FileReader("file.txt"))){
      String line;
      while((line = in.readLine())!=null){
          String[] pair = line.split(";");
          french.add(pair[0]);
          english.add(pair[1]);
      }
    }

```
```
mot;word 
oui;yes
utiliser;use
comment;how

```

It appears that the structure of each line is 

```
frenchWord;englishWord

```

So you can read each line of your file using a [`Scanner`](http://docs.oracle.com/javase/7/docs/api/java/util/Scanner.html) (using the constructor [`Scanner(File source)`](http://docs.oracle.com/javase/7/docs/api/java/util/Scanner.html#Scanner%28java.io.File%29)) and the [`nextLine()`](http://docs.oracle.com/javase/7/docs/api/java/util/Scanner.html#nextLine%28%29) method, and [`split`](http://docs.oracle.com/javase/7/docs/api/java/lang/String.html#split%28java.lang.String%29) each line by `";"`.

The first element in the array will be the french word and the second one the english word.

Add those element in two separate [`List`](http://docs.oracle.com/javase/7/docs/api/java/util/List.html) ([`ArrayList`](http://docs.oracle.com/javase/7/docs/api/java/util/ArrayList.html) per example), one containing all the french words, and the other one the english words.