Oh my god i got it :) Thank you so much Norm !!
Type: Posts; User: clyxee
Oh my god i got it :) Thank you so much Norm !!
How should i do that ? give a string and then replace letters or how ?
It was pretty confusing, that's why i asked if there's other ways to do it :) Thank you Norm
Now i have another question: How can i compare the end result with the original word, to stop the game ?
public class Test {
public static ArrayList<String> allLetters = new ArrayList<String>();
public static String letters[] = { "p", "e", "l", "a", "c", "d" };
public static String userWord,...
public class Test {
public static ArrayList<String> allLetters = new ArrayList<String>();
public static String letters[] = { "p", "e", "l", "a", "c", "d" };
public static String userWord,...
public class Test {
public static ArrayList<String> allLetters = new ArrayList<String>();
public static String userWord, userGuess;
public static void...
Here is the small program [Java] help - Pastebin.com , tho i'm using TextIO to make user input easier.
When i try to guess word "apple" then everytime i guess a letter the "_" adds in that word..
my current output is : A _ _ P _ P _ _ _ _ "
but what i desire is : "A P P _ _ "
Thank you Norm for clearing that for me, but the end result stays the same as before.
I'm familiar with arrays and all the tried letters are saved to ArrayList. With a little help from my dear friend google, i came up with this:
for (int i = 0; i < userWord.length(); i++) {...
Hi, i'm trying to do a hangman game for my home task, and i got a few problems :)
the first problem is: How can i return a string from for loop?
Here is what i got so far:
for (int i = 0; i <...