public class Program01 { public static void main(String[] args) { Scanner stdIn = new Scanner(System.in); String cPhrase = ""; //common phrase entered by the user String gPhrase = cPhrase; String guess = ""; //guess entered by the user System.out.println("Please enter the phrase to guess at : "); cPhrase = stdIn.nextLine(); int i = cPhrase.indexOf(' '); if (cPhrase.charAt(i) == ' ') { i += ' '; } else { i += '?'; } for (cPhrase.indexOf(0), cPhrase.indexOf(ch)) System.out.println(gPhrase); } }