Here is my method:
IT checks to see if the alphabet that the user entered in an another method has already been guessed. If it has already been guessed, it returns true, and if has not been already guessed, it adds the alphabet into used, and returns false. But the error says that there are no return statements...I am not familiar with methods in general, so I am confused. Any help would be appreciated!
//usedLetters method to check if user's guess has already been guessed private boolean usedLetters(char used[], char alphabet) throws IOException { for(int x=0; x<used.length; x++){ if(alphabet == used[x]) { return true; } else { used[dataSize] = alphabet; return false; } } }//End of usedLetters method
IT checks to see if the alphabet that the user entered in an another method has already been guessed. If it has already been guessed, it returns true, and if has not been already guessed, it adds the alphabet into used, and returns false. But the error says that there are no return statements...I am not familiar with methods in general, so I am confused. Any help would be appreciated!