Q:

Finding string from word list with some characters from the string

I'm making a program to sort a list of strings (Around 50) and they have a maximum of 10 characters. I have created 10 text boxes which will each take one character from the word. I'd like fill in boxes randomly and come out with word matches but don't know where to start. Will I need to use a sorting algorithm to do what I need? How do I make sure that the character is in the same position of all the words (IE if I had the word "Hello" and "Hi", if I filled in text box one with H it will return both since the first letter matches). I figure it has something to do with sub-string but I can quite put my finger on it.
Edit: If you have a hard time understanding what I've asked Cinnam outlined exactly what i'm looking for in the comments.

A:

Here is a code that works fine.
You have to enter the options with "-" as blanks
Example :
I want to find the words with "s" as third position.
--s-------

Here is the full code. If you have any question, do not hesitate.
import java.util.ArrayList;
import java.util.Scanner;

public class myTest{

    public static void main(String[] args) {
        String [] myWords = {"Finding", "string", "from", "word", "list", "with", "some", "characters", "from", "the", "string"};
        String [] myChars = new String[10];
        String match;
        boolean matches;
        Scanner scan = new Scanner(System.in);
        ArrayList<Integer> indexes = new ArrayList<>();

        System.out.println("Enter the string that has to match ");
        System.out.println("Enter '-' if it doesn't matter");
        match = scan.nextLine();
        for (int i = 0 ; i < 10 ; i++){
            myChars[i] = String.valueOf(match.charAt(i));
            if (!myChars[i].equals("-")) indexes.add(i);
        }

        for (int i = 0 ; i < myWords.length ; i++){
            matches = true;
            for (int j = 0 ; j < indexes.size() ; j++){
                if (!String.valueOf(myWords[i].charAt(indexes.get(j))).equals(myChars[indexes.get(j)])){
                    matches = false;
                    break;
                }
            }
            if (matches) System.out.println(myWords[i]);
        }
    }
}

Example of an output :
Enter the string that has to match 
Enter '-' if it doesn't matter
-i--------
Finding
list
with

