Broken keyboard challenge
setDict() is a bit of a misnomer; loadDict() would be more accurate.  Since the loaded dictionary becomes part of the global state, it would be more appropriate to make it an instance variable than a static variable.  If loading fails, you shouldn't just print a stack trace and attempt to continue execution — that defeats the purpose of exceptions.  In general, if you don't have a good way to handle an exception, just propagate it (by declaring throws IOException).

Your technique for checking whether a word consists solely of a limited set of characters is to do repeated string replacement.  That would cause a lot of temporary objects to be allocated and discarded.  A more appropriate tool to use would be a regular expression match (using Pattern.compile("^[bikn]*$"), for example).

Since this is a filtering exercise, it would be more eloquently written using Stream&lt;String&gt;.filter(Predicate) instead of List&lt;String&gt;.

Although String args[] is syntactically valid, String[] args is considered more idiomatic in Java, since String[] is considered the type.

Suggested solution

import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.util.function.Predicate;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
import java.util.stream.Stream;

public class BrokenKeyboard {
    public static Predicate&lt;String&gt; typableUsing(String availableKeys) {
        // CAVEAT: availableKeys is assumed not to contain regex metacharacters
        // such as ^ [ ] - \
        return Pattern.compile("^[" + availableKeys + "]*$").asPredicate();
    }

    public static Stream&lt;String&gt; dictionary(File f) throws IOException {
        return Files.lines(f.toPath());
    }

    public static void main(String[] args) throws IOException {
        System.out.println(
            BrokenKeyboard.dictionary(new File(args[1]))
                          .filter(BrokenKeyboard.typableUsing(args[0]))
                          .collect(Collectors.joining(", "))
        );
    }
}


It is possible to resolve the caveat using Pattern.quote().  I'll leave it as an exercise to the reader.  =)