Search:

Type: Posts; User: ashboi

Search: Search took 0.10 seconds.

  1. Replies
    1
    Views
    1,441

    How to store char variable in an array

    How do you store a char variable into an array ? For instance a letter inputted by keyboard to store directly into array and then display array. Using it for Hangman game to try and display letters...
  2. Replies
    4
    Views
    1,333

    Re: Help with java char Array

    Doesn't really answer my intended question. If you have a look at my code above. Im having problems when displaying all the guessed letters. As in when user guesses it stores in array then displays it
  3. Replies
    4
    Views
    1,333

    Help with java char Array

    Working on a Hangman Game. Trying to add a guess(char variable) into char array and display a list of guessed letters. Please help this piece code isn't working


    ...
  4. Replies
    6
    Views
    1,271

    Re: Please help with cumulative sum code...

    Thanks a million... Works perfectly. Defined it as
    static int cum
  5. Replies
    6
    Views
    1,271

    Re: Please help with cumulative sum code...

    import java.util.Scanner;
    public class Hangman
    {
    int cum;
    public static void main(String[] args)
    {
    System.out.println("Welcome to Hangman... v1.0 - Designed Ashley Bwanya");...
  6. Replies
    6
    Views
    1,271

    Re: Please help with cumulative sum code...

    Tried it but the method cannot reach the varible. And yes its the same problem
  7. Re: Program goes into infinite compilation. University project - Library Program.

    Complies good on JGrasp... Try using a different complier or make sure you have the latest version of your complier and java.
  8. Replies
    6
    Views
    1,271

    Please help with cumulative sum code...

    This is sample of my code. I need be able to have a cumulative score after the user plays x number of times. But keep getting same answer.




    import java.util.Scanner;
    public class Hangman...
  9. Re: Basic Java Calculating Cumulative Score - Hangman Help

    Have tried that but it, needs to be initialized so do it by using "int cumScore = 0;" now when I call initGame() for the user to play again I think it sets the cumScore to 0 again.
  10. Basic Java Calculating Cumulative Score - Hangman Help

    I am programming a Hangman Console game. Have done most of it by stuck whereby I need to save cumulative score. Assignment reads:

    If word is complete then

    add the score (5 mins the number of...
  11. Replies
    4
    Views
    1,436

    Help come out of inifinite loop

    Trying to code a Hangman Console Game. But my loop is not stopping when two words are equal. Below is my code. The secret word is "hello". Outcome is under code.


    import java.util.Scanner; ...
  12. For Loop and String Problem - Console Hangman Game

    I am doing my Hangman Project and need assistance. I am doing the first part, have managed to hide the word using (*), but now the problem I am facing is. After I first guess I need it to replace (*)...
  13. Re: Card Class (Setting string rank value. 1 = "Ace" etc)

    Thanks for reply ... Haven't got to Arrarys yet its the next chapter we are looking at. Is the another way to do it using Characters, Strings and Stringbuilder ?

    Like using valueOf(int i) etc ???...
  14. Card Class (Setting string rank value. 1 = "Ace" etc)

    My Current Card Class


    public class Card

    {
    private String suit;
    private int value;

    public void setSuit(String newSuit) //Setting suit
  15. Replies
    2
    Views
    1,493

    Simple Division not working heeeeelp

    Doing a small quiz program. At the end trying to do a percentage but I get 0. Dont know why. The code is below:

    import java.util.Scanner;


    public class Quiz

    {

    public static void...
Results 1 to 15 of 15