help with java Hangman
<p>i have to build a hangman program for java for a class. the problem i'm having is having the letter change once you guess a letter. all it's doing is getting an error when i guess. any help would be appreciated, thank you</p>

<pre><code>import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Random;

public class test2 {
public static void main( String[] args ) {
HangmanSession hangmanSession = new HangmanSession();
hangmanSession.play();
}
}

class HangmanSession {
private Player player;
private Words secretWord;
private LetterBox letterBox;
private int triesNumber = 6;

public HangmanSession() {
player = new Player();
player.askName();
secretWord = new Words();
letterBox = new LetterBox();
}

private void printState() {
letterBox.print();
System.out.print( "Hidden word : " );
secretWord.print();
System.out.print( "Tries left: " + triesNumber + "&lt;guess letter:&gt;" );
}

public void play() {
boolean bool = true;
while( true ) {
bool = true;
printState();
char ch = player.takeGuess();
if( letterBox.contains( ch ) ) {
System.out.println( "Try again, you've already used the letter " + ch );
bool = false;
}
if( bool ) {
if( secretWord.guess( ch ) ) {
System.out.println( "You have found the letter " + ch );
}
else {
triesNumber--;
}
if( triesNumber &lt; 1 )
gameOver();

if( secretWord.found() )
congratulations();
}
}
}

public void congratulations() {
System.out.println( "Congratulations " + player + ", you win!" );
System.exit( 0 );
}

public void gameOver() {
System.out.println( "Sorry " + player + ", this time you lose!" );
System.exit( 0 );
}
}

class Words {
private String fv;
private StringBuffer pValue;
private int found = 0;
{

String Words[] = new String[23];

Words[0] = "carbon";
Words[1] = "dictionary";
Words[2] = "restaurant";
Words[3] = "televison";
Words[4] = "responsible";
Words[5] = "technology";
Words[6] = "computer";
Words[7] = "communicate";
Words[8] = "automobile";
Words[9] = "coffee";
Words[10] = "federation";
Words[11] = "exaggerate";
Words[12] = "cappuccino";
Words[13] = "macintosh";
Words[14] = "apple";
Words[15] = "microsoft";
Words[16] = "lighter";
Words[17] = "shark";
Words[18] = "bunker";
Words[19] = "argument";
Words[20] = "playstation";
Words[21] = "parrot";
Words[22] = "canine";

 Random random = new Random();
 int randomWord = random.nextInt(22);

    for (int i = 0; i &lt; Words.length; i++);

    String[] displayLetters = new String[Words[randomWord].length()];

for (int i=0; i&lt;displayLetters.length; i++)

{
    displayLetters[i] = "_";
}
for (int i=0; i&lt;displayLetters.length; i++)
{
    System.out.print(displayLetters[i]+" ");
}
}
{

}   

public boolean found() {
System.out.println( "Letters found:" + found + "/" + fv.length() );
return ( found == fv.length() );
}


public boolean guess( char c ) {
int index = fv.indexOf( c );
if( index == -1 )
return false;
else {
found = found + findOccurances( c );
return true;
}
}

private int findOccurances( char c ) {
int idx = fv.indexOf( c );
pValue.setCharAt( idx, fv.charAt( idx ) );
int counter = 1;
while( idx != -1 ) {
int index = fv.indexOf( c, idx + 1 );
idx = index;
if( idx != -1 ) {
counter++;
pValue.setCharAt( idx, fv.charAt( idx ) );
}
}
return counter;
}

public void print() {
System.out.println( pValue );
}

}


class Player {
private String name = "";
public void askName() 
{System.out.print( "Player, enter your name:" );


name = receiveInput();

}

public char takeGuess() {
return receiveInput().charAt( 0 );
}

private String receiveInput() {
String str = " ";
BufferedReader br = new BufferedReader( new InputStreamReader( System.in ) );
try {
str = br.readLine();
}
catch( IOException ex ) {
ex.printStackTrace();
}
return str;
}

public String toString() {
return name;
}

}


class LetterBox {
private char[] lbox = new char[24];
private int counter = 0;

public boolean contains( char c ) {
for( int i = 0; i &lt; counter; i++ ) {
if( lbox[i] == c )
return true;
}
lbox[counter] = c;
counter++;
return false;
}

public void print() {
System.out.print( "\nLetterBox:" );
for( int i = 0; i &lt; counter; i++ ) {
System.out.print( lbox[i] );
}
System.out.println( "" );



}


}
</code></pre>

<p>Im getting null for the hidden word: and i'm getting these errors when i try to guess a letter</p>

<p>Exception in thread "main" java.lang.NullPointerException
    at Words.guess(Hangman2.java:141)
    at HangmanSession.play(Hangman2.java:53)
    at Hangman2.main(Hangman2.java:11)</p>
