This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem with DotCom project from Head First Java 2nd edition.

 
Brendan Klaus
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

New to programming and Java. I 'm having a problem with this code.







I feel like the problem is in setupGame. Like its hanging looking for some missing input necessary to move forward.

This is the the output.

"Your goal here is to sink all the dot coms!
Try to sink them all in the fewest number of guesses.
I'm running as expected"

Thanks!

Also, I know there were some other posts about this same project, and I did look at them, but none of them seemed to match the problem I was having.



 
Winston Gutkowski
Bartender
Pie
Posts: 10111
56
Eclipse IDE Hibernate Ubuntu
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Gabor Ewhaas wrote:I have struggled for making the code work too. After a whlie my solution is below...

Gabor:

1. Welcome to Javaranch.
2. In future, please UseCodeTags (←click).
3. We generally don't like people to post ready-made solutions on these forums, especially in the 'Beginning Java' area. I'm sure your intentions were great, but it's far better to simply help people and let them work things out for themselves.

For the moment, I've removed your post in such a way that it can be restored if my colleagues think that I've overstepped my authority.

Winston
 
Gabor Ewhaas
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Winston,

thank you for your honorable advices. I'm new to java and to this forums too. Next time i will do so as you said. I agree with you -- and with the common law which is expected here i mean.

Gabor
 
Winston Gutkowski
Bartender
Pie
Posts: 10111
56
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Gabor Ewhaas wrote:thank you for your honorable advices. I'm new to java and to this forums too. Next time i will do so as you said. I agree with you -- and with the common law which is expected here i mean.

No probs; and thanks for not taking my post personally. It's simply the JavaRanch etiquette.

And please, do feel free to offer advice. That's what these forums are here for.

Winston
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic