I'm writing a program similar to hangman. I need to set the length of an array of '-'s to the length of the word input. I've got the length of the and i've got the array i just can't figure out how to "combine them" in a manner of speaking.
public static char[] initializeDisplay(char[] wordToGuess) {
int len=wordToGuess.length;
System.out.print(len);
char[] charArray ={ '-' };
return charArray;
}