The Artima Developer Community
Sponsored Link

Java Answers Forum
Help with an Assignment, Strings Info

1 reply on 1 page. Most recent reply: Jul 25, 2003 5:44 AM by Fawad Shah

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
Philip Pompili

Posts: 12
Nickname: ppompili
Registered: Jul, 2003

Help with an Assignment, Strings Info Posted: Jul 22, 2003 8:32 PM
Reply to this message Reply
Advertisement
I am having a problem with a school assignment, we have to create a game of hangman and there are some things that I can't figure out. Obviously in hangman you have to guess a letter then see if that letter is in the word. Now I know how to get someone to enter a character, but I dont know how to tell Java where the character is and tell it what character to replace.

Can someone please help...

Thanks


Fawad Shah

Posts: 9
Nickname: smartarse
Registered: May, 2003

Re: Help with an Assignment, Strings Info Posted: Jul 25, 2003 5:44 AM
Reply to this message Reply
In this case, you could use a nested if statement, and compare the character entered against the stored word, one at a time. If there is a match, just make it appear, so let it be entered into that space.

Cheers.

Flat View: This topic has 1 reply on 1 page
Topic: String Counting Previous Topic   Next Topic Topic: please any help on this project will be appreciated, am very much lost

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use