SHARE
TWEET

Untitled

a guest Aug 20th, 2019 74 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class Hangman {
  2.   private final String secretWord;
  3.  
  4.   public Hangman(String secretWord) {
  5.     this.secretWord = secretWord;
  6.   }
  7.  
  8.   public String hint() {
  9.     int lengthOfHint = secretWord.length();
  10.     return "_".substring(0, lengthOfHint);
  11.   }
  12. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top