Java in easy steps, 6th edition instructs you how to easily create your own exciting Java programs. Updated for Java 9, which was released September 2017, it contains separate chapters on the major features of the Java language. Complete example programs with colorized code illustrate each important aspect of Java programming - all in easy steps.
This book assumes no previous knowledge of any programming language so it's ideal for the newcomer to computer programming. Each chapter builds your knowledge of Java. By the end of this book you will have gained a sound understanding of the Java language and be able to write your own Java programs and compile them into executable files that can be run on any Java-enabled device.
This 6th edition of Java in easy steps covers the new features of Java 9, including:
• REPL (a Read-Eval-Print-Loop) – a new feature of Java 9. This is an interactive shell named JShell, which will be demonstrated in this edition of the book. With JShell, users can quickly run Java statements. It acts in a similar way to the Python interpreter.
• How to create an Android app, as the core libraries in the Android operating system provide Java functionality.
Table of Contents:
1. Getting started 2. Performing operations 3. Making statements 4. Directing values 5. Manipulating data 6. Creating classes 7. Importing functions 8. Building interfaces 9. Recognizing events 10. Deploying programs
I used this book as a beginner primarily for a reference. I love the color coded chapters and I found it easy to find syntax examples quickly. The index is useful as well. I did not attempt to practice the code. The code is not printed exactly in the book, but instead tells you in a prose style what to write. It is downloadable online. I think that not seeing the exact code would have been helpful. When I got to the section on Swing Java I tested some of the code and found it would not run as written. There were explanations later in the book that might have explained why, however it was frustrating, and makes it not useful for a beginner. Overall I recommend as a reference for a beginner. I do not think it would be useful for someone with more experience.
Had a difficult time finding a good book to help my 14 year old learn Java. While this book is short and relatively friendly, I wasn't entirely satisfied with it. However, it gave material for him to read when I wasn't around to work on Java projects with him.
I have the 4th edition, and I see that (as I type), a 5th edition is slated to come out in two months. If this author McGrath is reading this review, I hope he fixes the following:
1) Page 30: McGrath writes "The == equality operator compares two operands and will return true if both are exactly equal in value. If both are the same number they are equal, or if both are String values containing the same characters in the same order they are equal."
Yikes! Please add the idea of String literals to the discussion, since, yes, two matching String literals could be found to be the same with ==, but Strings in general cannot. == is for String reference equality, .equals() is for String value equality. Note, the author later gets this right on page 90.
2) Page 86: "...Math.random() method, which returns a double precision random number between 0.0 and 0.999. Multiplying the random number will specify a wider range. For example, multiplying by ten will create a random number in the range of 0.0 to 9.999."
Doing good so far, but then the author writes "Now rounding the random number up with Math.ceil() will ensure it falls within the range of 1-10 inclusive." He goes on in code to do just that. However, there's a rare case of random returning 0, since the range is [0, 10), and this would cause his approach to fail. That's why coders write Math.floor(Math.random()*10 + 1) instead of Math.ceil(Math.random()*10).
3) The rest is more nitpicking. Might be nice to drop the applets section, or at least describe how they now (don't) work with all the new security constraints. Perhaps beginners don't need to think that jumping to label names is the only way to achieve flow control within double-nested blocks. Etc.
Although slightly dated in a few areas, this is an excellent introduction for people new to programming, Java or both. It walks you slowly through each aspect, with plenty of explanation and documentation for every example, and gives indications of best practice.
It would be wise to obtain a more current version, if available, just to make sure everything is still the same, but on the whole this is a good, non-threatening book for those just starting out.
Whether you're teaching yourself Java or teaching it to others, the pace, repetition, and clarity of Java in easy steps make it enjoyable. I recommend dedicating a chapter per two hours of instruction, or a little less for the self-guided learner. You'll want to start exploring official documentation early, alongside the guides practice in this book. Relax and explore! Java is easy when you take it in small steps!
Although this is in easy steps, understanding it still takes programming knowledge, and the writing style is grad school level (I typed a few paragraphs into Word and let it do the spell and equivalency tests.)