Q:

Find all words in dictionary given a string of words

I am attempting to write a program that will find all the words that can be constructed from it using a dictionary which has been loaded into an arrayList from a file. sowpodsList is the dictionary stored as an arrayList. I want to iterate through each word in the dictionary and then compare it to the string. Being that the string is just a random collection of words how do I go about achieving this ?  
Input: asdm
Output: a, mad, sad .... (any word which matches in the dictionary.)
for (int i = 0; i < sowpodsList.size(); i++) {
    for (int j = 0; j < sowpodsList.get(i).length(); j++) {
        if (sowpodsList.get(i).charAt(j) ==   )
            ;
    }
}

A:

You can search if the count of each character of each word in the dictionary is equal to the input's character count.
        ArrayList <String> matches = new ArrayList <String> ();

        // for each word in dict
        for(String word : sowpodsList) {

            // match flag
            Boolean nonMatch = true;

            // for each character of dict word
            for( char chW : word.toCharArray() ) {

                String w = Character.toString(chW);

                // if the count of chW in word is equal to its count in input, 
                // then, they are match
                if ( word.length() - word.replace(w, "").length() !=
                    input.length() - input.replace(w, "").length() ) {
                    nonMatch = false;
                    break;
                }
            }
            if (nonMatch) {
               matches.add( word );
            }
        }

        System.out.println(matches);

Sample output: (dict file I used is here: https://docs.oracle.com/javase/tutorial/collections/interfaces/examples/dictionary.txt)
Input: asdm
Matches: [ad, ads, am, as, dam, dams, ma, mad, mads, mas, sad]

