Help with hangman tutorial. Programming Software Development by wicked357 … the output, you may find that the HangmanGame and HangmanMenu methods are not being called. Why… *argv[]) { HangmanMenu myMenu("hangman.txt"); HangmanGame myGame(myMenu); Controller myController(myGame); myController.start(); // Start…with the menu, and confirm the correct method HangmanGame::play() is being invoked when you choose (… NullPointerException when importing classes please help Programming Software Development by ladybirdchance …(FRAME_WIDTH, FRAME_HEIGHT); containerPanel = new JPanel(); WordGenerator myWord = new WordGenerator(); HangmanGame game = new HangmanGame(myWord.getWord()); createWordField(); createImagePanel(); createLetterPanel(); createButtonPanel(); createContainerPanel(); createMenuBar… Re: NullPointerException when importing classes please help Programming Software Development by radhakrishna.p …class variable references as a instance variavbles as follows private HangmanGame game; private WordGenerator myWord; but those 2 references … of inside the constructor WordGenerator myWord = new WordGenerator(); HangmanGame game = new HangmanGame(myWord.getWord()); as follows this.myWord = new WordGenerator();… Need help with hangman game and array manipulation Programming Software Development by uzii305 … is my code so far. Thanks is advance. [CODE] package hangmangame; import java.util.Scanner; import java.util.Random; import java….io.*; import java.util.*; import java.lang.*; public class HangManGame { public static void main(String[] args) throws IOException { HangManStates states… Re: Need help with hangman game and array manipulation Programming Software Development by uzii305 … i add the '*' to the secretWord length array??? [CODE] package hangmangame; import java.util.Scanner; import java.util.Random; import java….io.*; import java.util.*; import java.lang.*; public class HangManGame { public static void main(String[] args) throws IOException { HangManStates states… Re: NullPointerException when importing classes please help Programming Software Development by harinath_2007 Your title to the post looks odd. you dont get any nullpointer exception when you try to import any class. If a class is not found , then you'll get NoClassFound Exception. Maybe you are trying to accessing a object which has 'null' value. Try to figure out yourself , as this is a runtime excepiton, you dont know unless you go through your code … Re: NullPointerException when importing classes please help Programming Software Development by bguild Tracking down the cause of a `NullPointerException` is a simple matter of looking at the top of the stack trace which indicates the exact place where a null pointer was encountered. If the top method isn't one that you wrote, then go down the stack until you find a method that you wrote, but in this case you wrote the method at the top of the stack… Re: NullPointerException when importing classes please help Programming Software Development by ladybirdchance Yea, that was the problem. Didnt realise I had done something so silly. Works perfect now. Thanks For the help everyone :) Re: Need help with hangman game and array manipulation Programming Software Development by stultuske well, you have two Strings: 1. your original word 2. a String the same length as your original one filled with *'s. you print the second one. whenever you guess a char, you verify with the original String if the char is in there, and if so, check the indexes of where, and at that same index, you change the char in your *'s char to that char. Re: Need help with hangman game and array manipulation Programming Software Development by zeroliken [QUOTE=stultuske;1782870]well, you have two Strings: 1. your original word 2. a String the same length as your original one filled with *'s. you print the second one. whenever you guess a char, you verify with the original String if the char is in there, and if so, check the indexes of where, and at that same index, you change the char in your *'s… Re: Need help with hangman game and array manipulation Programming Software Development by uzii305 [QUOTE=stultuske;1782870]well, you have two Strings: 1. your original word 2. a String the same length as your original one filled with *'s. you print the second one. whenever you guess a char, you verify with the original String if the char is in there, and if so, check the indexes of where, and at that same index, you change the char in your… Re: Need help with hangman game and array manipulation Programming Software Development by uzii305 What is the syntax of indexof()?? Re: Need help with hangman game and array manipulation Programming Software Development by uzii305 I got the first part thank you guys im working on checking userInput char with array secretWord. Any hints on possible algorithms would be appreciated. Thank you guys. You're awesome. Re: Need help with hangman game and array manipulation Programming Software Development by zeroliken Just thought up on an alternative(better in my opinion) solution in checking if a letter input exists. Loop the string index and compare each character using charAt() method then change the index of the secret word with the letter input, you could use the StringBuilder class setCharAt() method to change the specified index with the letter If your … Re: Need help with hangman game and array manipulation Programming Software Development by uzii305 Thanks boss. Greatly appreciated.