• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
  • Knute Snortum
Sheriffs:
  • Liutauras Vilda
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Joe Ess
  • salvin francis
  • fred rosenberger

HeadFirstJava problem with singular

 
Ranch Hand
Posts: 153
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello , I am from Poland and I have a problem...

It's my code:




But when it prints at last lanes it shows
1 Butelki of beer on the wall              <------ Why Butelki instead of Butelka? Please help me !
1 Butelka of beer on the wall
1 Butelka of beer
Take one down, pass it around
Nie ma juz piwa jelopie


 
Arek Wróbel
Ranch Hand
Posts: 153
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nevermind i fixed that but I don't know yet how XD...

 
Arek Wróbel
Ranch Hand
Posts: 153
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok ... i figured it out, I just didn't open { at the end
 
Arek Wróbel
Ranch Hand
Posts: 153
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Arek Wróbel wrote:Ok ... i figured it out, I just didn't open { at the  

 
Arek Wróbel
Ranch Hand
Posts: 153
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I won't delete this thread, maybe someone can learn something from it, I feel stupid right now ...
 
Marshal
Posts: 67535
257
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch

You have done well sorting out the problem and telling us how it was done.
If you look at lines 11‑22 of your original code, you can see inconsistent indentation and placement of {}. That makes it difficult for you to see where pieces of code end, and can cause severe confusion. We have some suggestions about formatting here. Setting up automatic indentation on your text editor and writing code backwards (as here) can help prevent such problems in future.
 
I am not young enough to know everything. - Oscar Wilde This tiny ad thinks it knows more than Oscar:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!