Hi JavaRanch cool people.
I just started learning
Java and I am studying Head First Java. I'm doing the "Coding A Serious Business Application" on page 14. It's the classic Beersong.java activity that I have seen discussed on codeRanch.
Out of all of the threads I have read I have not seen anyone reporting the same issue I am seeing. I also am not understanding a fundamental piece of the code...
Question#1
My output looks like this...
"99 bottleof beer on the wall
99 bottleof beer."
Notice 'bottle' and 'of' are concatenated. I have reviewed my code many times and from everything I can tell it is verbatim what is listed on page 14 in headFirstJava.
Question#2
For this section of code "System.out.println (beerNum + " " +
word + "of beer on the wall");" I do not understand why we need the " " between beerNum and word. I don't understand what purpose it plays as we assign "Bottles" to the
String word variable so it seems redundant to me.
I hope this all makes sense.