When the program calls the getValidString it won't display "Judge Another? (y/n)"
It seems like everything should work I just can't figure it out
//see if the user would like to continue
choice = getValidString(sc,"Judge Another? (y/n): ", "y" , "n" );
private static String getValidString(Scanner sc, String prompt, String s1, String s2)
{
String s = "";
boolean isValid = false;
while(isValid ==false)
{
s = getString(sc,prompt);
if(s.equalsIgnoreCase("y") || s.equalsIgnoreCase("n"))
{
isValid = true;
}//end if
else
{
System.out.println("Error! Please enter '" + s1 + "' or'" + s2 + "'.");
}//end else
}//end while
return s;
}//end getValidString
private static String getString(Scanner sc, String prompt)
{
String s = "";
boolean isValid = false;
while (isValid == false);
{
System.out.print(prompt);
s = sc.nextLine();
if (s.equals(""))
System.out.println("Error! Entry Required.");
else
isValid = true;
}//end while
return s;
}//end getString