How can I print out dashes "-" in the same length as the word length? I used for-loop but only got 1 dash.
for(int i=0; i<secretWordLen; i++) theOutput = "-"; Main:
public String processInput(String theInput) { String theOutput = null; String str1 = new String(words[currentJoke]); int secretWordLen = str1.length(); if (state == WAITING) { theOutput = "Connection established.. Want to play a game? 1. (yes/no)"; state = SENTKNOCKKNOCK; } else if (state == SENTKNOCKKNOCK) { if (theInput.equalsIgnoreCase("yes")) { //theOutput = clues[currentJoke]; //theOutput = words[currentJoke]; for(int i=0; i<secretWordLen; i++) theOutput = "-"; state = SENTCLUE;