Q:

java.util.Dictionary is abstract; cannot be initialised

I'm trying to make a simple array list and pass in a bunch of entries from a text file but I am having trouble loading the text file into the list this is what my code looks like right now:
import java.util.*;
import java.io.*;

public class PirateDictionary {
    private ArrayList<Dictionary> phrases;
    private String word;

    public PirateDictionary() {
        phrases = new ArrayList<Dictionary>();
    }

    public PirateDictionary(String w) {
        word =w;
    }

    public void load(String loadthis) throws IOException {
        Scanner infile = new Scanner(new InputStreamReader 
                                (new FileInputStream(loadthis)));

        int num = infile.nextInt(); 
        infile.nextLine();
        for (int i = 0; i < num; i++) {
            String w = infile.nextLine();

            PirateDictionary c = new Dictionary(w);
            phrases.add(c);
        }
        infile.close();
    }
}

I'm only interested in one variable here which would be 'w', I just want to pass in individual words. Any advice on this would be highly appreciated.

A:

Dictionary formed the base for the now obsolete Hashtable. Use a Map instead

