I am currently in a computer programming class and at a dead end for "creating a template" for this 2-person hang man game.

* First, person#1 is prompted for a phrase (contains all lowercase)
* Then, I must take whatever phrase they choose and turn it into a template with all ?'s.
* Then, as person#2 guesses letters, I must "reveal" the phrase and have the ?'s turn into the phrase letters.

I can't get past turning it into the template though. An example is:

person#1's phrase: "hello world"

desired template outcome: "????? ?????"

This is what I have so far... I'm having trouble at public static String createTemplate(String sPhrase)

```
    import java.util.Scanner;

public class Program9 
{
public static void main (String[] args)
{
    Scanner scanner = new Scanner (System.in);
    Scanner stdIn = new Scanner (System.in);

    int cnt = 0; //counter is set to zero
    String sPhrase;
    boolean def;

    System.out.print("Enter a phrase consisting of only lowercase letters and spaces: ");
    sPhrase = scanner.nextLine(); //reads into variable set to Scanner.nextLine()

    System.out.println("\n\n\nCommon Phrase");
        System.out.println("--------------\n");

        String template = createTemplate(sPhrase); //will run through "createTemplate" and show whatever on there.

    do
    {

        char guess = getGuess(stdIn); //will run through "getGuess" and show whatever SOP and return from that. WORKS.

        cnt = cnt + 1; //counts the guess

        System.out.println("\n\n\nCommon Phrase");
        System.out.println("--------------\n");

        String updated = updateTemplate(template, sPhrase, guess); //runs throuhgh and prints updated template

    } while (!exposedTemplate(sPhrase)); //will loop back if updated template still has ?'s

    System.out.println("Good job! It took you " + cnt + " guesses!");
}
public static String createTemplate(String sPhrase)
{
    String template = null;
    String str;

    sPhrase.substring(0, sPhrase.length()+1); //not sure if +1 needed.
    sPhrase.equals(template);

    //THIS IS WHERE IM HAVING PROBLEMS

}
public static char getGuess(Scanner stdIn)
{
    //repeatedly prompts user for char response in range of 'a' to 'z'
    String guess;

    do
    {
        System.out.print("Enter a lowercase letter guess : ");
        guess = stdIn.next();
    } while (Character.isDigit(guess.charAt(0)));

    char firstLetter = guess.charAt(0);
    return firstLetter;
}

public static String changeCharAt(String str, int ind, char newChar)
{
    return str.substring(0, ind) + newChar + str.substring(ind+1);
    //freebie: returns copy of str with chars replaced

}
public static String updateTemplate(String template, String sPhrase, char guess)
{
    //will have to include changeCharAt

}
public static boolean exposedTemplate(String template)
{
    // returns true exactly when there are no more ?'s

}
}

```