Chapter 1 of this book call Headfirst Java was very intriguing, reading this book was much better than any other book or textbook that i have read in school. However, it was only chapter 1 and it was kinda just an introduction to Java and since I already have a small background in Java I really did not learn much as it was more of refresher. But on the other hand I was able to troubleshoot the 99 bottles of beer song program and troubleshoot the random phrase generator and make them both successfully run. The code for both are posted below.
99 Bottles of beer program
The error in this program was that there was a line say " 1 bottles of beer on the wall" and that is very improper grammar. So all I did to fix it was instead of having beerNum > 1, I made it > 0 and it ended up solving the grammatical error. So again this served as a refresher for me for my Java skills, but since then I have learned Python. Python syntax is like Java in many ways but is less complex. I have found that I am almost writing Python syntax when writing the code above. I have high hopes for this Java book to teach me more about Java and take me more in depth about it.
Random Phrase Generator
No comments:
Post a Comment