Home > Java Programming > Effective Java

Effective Java

October 20th, 2010

Rating:
List Price: Add to cart to see price
Sale Price: Too low to display.

Book Overview:

This is the eBook version of the printed book. Are you looking for a deeper understanding of the Java™ programming language so that you can write code that is clearer, more correct, more robust, and more reusable? Look no further! Effective Java™, Second Edition, brings together seventy-eight indispensable programmer’s rules of thumb: working, best-practice solutions for the programming challenges you encounter every day.   This highly anticipated new edition of the classic, Jolt Award-winning work has been thoroughly updated to cover Java SE 5 and Java SE 6 features introduced since the first edition. Bloch explores new design patterns and language idioms, showing you how to make the most of features ranging from generics to enums, annotations to autoboxing.   Each chapter in the book consists of several “items” presented in the form of a short, standalone essay that provides specific advice, insight into Java platform subtleties, and outstanding code examples. The comprehensive descriptions and explanations for each item illuminate what to do, what not to do, and why.   Highlights include: New coverage of generics, enums, annotations, autoboxing, the for-each loop, varargs, concurrency utilities, and much more Updated techniques and best practices on classic topics, including objects, classes, libraries, methods, and serialization How to avoid the traps and pitfalls of commonly misunderstood subtleties of the language Focus on the language and its most fundamental libraries: java.lang, java.util, and, to a lesser extent, java.util.concurrent and java.io Simply put, Effective Java™, Second Edition, presents the most practical, authoritative guidelines available for writing efficient, well-designed programs.


Book Review

Read the book reviews below. If you have read , You can add your own review below.

out of 5 based on 0 ratings. 12796 user reviews
Java Programming This is the eBook version of the printed book. Are you looking for a deeper understanding of the Java™ programming language so that you can write code that is clearer, more correct, more robust, and more reusable? Look no further! Effective Java™, Second Edition, brings together seventy-eight indispensable programmer’s rules of thumb: working, best-practice solutions for the programming challenges you encounter every day.   This highly anticipated new edition of the classic, Jolt Award-winning work has been thoroughly updated to cover Java SE 5 and Java SE 6 features introduced since the first edition. Bloch explores new design patterns and language idioms, showing you how to make the most of features ranging from generics to enums, annotations to autoboxing.   Each chapter in the book consists of several “items” presented in the form of a short, standalone essay that provides specific advice, insight into Java platform subtleties, and outstanding code examples. The comprehensive descriptions and explanations for each item illuminate what to do, what not to do, and why.   Highlights include: New coverage of generics, enums, annotations, autoboxing, the for-each loop, varargs, concurrency utilities, and much more Updated techniques and best practices on classic topics, including objects, classes, libraries, methods, and serialization How to avoid the traps and pitfalls of commonly misunderstood subtleties of the language Focus on the language and its most fundamental libraries: java.lang, java.util, and, to a lesser extent, java.util.concurrent and java.io Simply put, Effective Java™, Second Edition, presents the most practical, authoritative guidelines available for writing efficient, well-designed programs.
http://www.bookpool.org/77-effective-java/

Similar Books:

  1. Core Java(TM), Volume I–Fundamentals (8th Edition)
  2. Engineering Your Writing Success: How Engineers Can Master Effective On-the-Job Communication Skills
  3. Fundamentals of Engineering : The Most Effective FE/Eit Review (Fundamentals of Engineering, 10th ed.)
  1. Alex Kuznetsov
    October 20th, 2010 at 22:29 | #1

    Rating

    If you are not very busy at work you should stop writing code till you finish reading this book.

    Seriously.

    BTW Don’t be tempted to save and buy a cheaper first edition.

    The second edition has some very important changes and new information.

  2. Martin J. Appel
    October 20th, 2010 at 22:51 | #2

    Rating

    Content wise this is one of the best if not the best book on Java I have ever bought. It is highly recommended.

    Writing style wise it is at times wordy. By that I mean that it sometimes takes a long time to deliver the point. In addition, sometimes important points are buried making it more difficult that necessary to find later (e.g. if you remember some scenario but not the details). This is, however, only minor shortcomings.

  3. Eric Jain
    October 21st, 2010 at 19:17 | #3

    Rating

    Did you realize that enums can implement interfaces? That the simplest safe way to implement a singleton is using an enum? That it’s possible to obtain an object reference to a private member using serialization? There are lots of ways to learn the language basics and figure out how to use the libraries. But nowhere do you have such a dense collection of non-obvious, yet important issues that any Java developer ought to be aware of. The book is written from the perspective of someone who creates public APIs, so there is a lot of obsessing over how to prevent users from doing things they shouldn’t (intentionally, or not). But even if that’s not a big concern for you, it’s nevertheless important to be aware of the issues. Having read the first edition a while back, reading the second edition was more that a good refresher — it’s almost a different book. This is in part thanks to Java 5, which has made a lot of the original items (e.g. how create enumerations) obsolete, while introducing the need for a whole new set of items (e.g. regarding the use of generics).

  4. Nicholas Dunn
    October 21st, 2010 at 21:22 | #4

    Rating

    I am thoroughly enjoying this book and learning a lot in the process. The author is responsible for many of the successful APIs in the Java language, such as the Collections framework, so he certainly knows what he is talking about.

    I am still a student but I can relate to some of the things he talks about, and see where I have deviated from his suggestions in the past. The author is clear to point out why these things are problems in terms of either code reuse, extensibility, type safety, or some other aspect, so even though it wasn’t necessarily an issue in the context of a school project, in the real world it certainly might be.

    The author borrows the format from Scott Meyer’s Effective C++ series of books, and it works very well in this context. While the chapters are logically organized, they are set up in such a way that you do not need to read from start to finish; you can jump around and read the interesting bits at will, and often items in one section of the book refer to later (or earlier) items.

    Finally, I appreciate that the book explains some of the less well known or understood features of recent versions of Java. For instance, I had never heard of the annotation feature added, but he goes on to show a great example of how you can use annotations to build a simple test framework for a class.

    Even if you are not yet a software professional, you owe it to yourself to get a jump start by reading this book.

  5. Romet Aidla
    October 22nd, 2010 at 06:14 | #5

    Rating

    Absolute classic, definitely my favorite Java book. Every professional Java developer should have it on her/his desk.

    It’s not the easiest book and shouldn’t be read if You are novice in Java, there better books to get started with Java, but for experienced developers, this book is invaluable.

  6. C. Longo
    October 22nd, 2010 at 21:23 | #6

    Rating

    I’ve been programming Java since 1995 and sometimes think I know everything I need to know about working with the language. “Effective Java” made me realize that there’s always much, much more to learn.

    This book is packed with incredibly useful information that every single Java developer should know. The best part is that Bloch is not proposing any kind of radical new programming method, he is simply organizing and presenting tried and true Java programming patterns and idioms.

    I can’t count how many times I’ve said, “Of course, it is so obvious! Why didn’t I think of that?” when I was reading this book. The items presented are things you may know, or half-know, and all it takes is the proper presentation and explanation to completely “ice” things in your mind. The best part is starting a new project after reading “Effective Java” and getting to try out all the good stuff in your own code.

    I bought the First Edition seven years ago and am so happy the Second Edition is finally here. It is well worth the wait. If you develop in Java in any capacity — get this book!

  7. Nardino Nicola
    October 28th, 2010 at 17:33 | #7

    Rating

    It’s a good book indeed, it touches many aspects of the Java language, well written. Although, other books are required if you really want to know more, like Java Generics and Java Concurrency in Practice.

  8. D. B. Chamberlain
    October 28th, 2010 at 23:05 | #8

    Rating

    If you want to know the good things about this book, read the other reviews, many of which I agree with. This review just states what makes the book 4 stars for me instead of 5, because none of the other reviews I read pointed them out.

    Most of the items in book are very good, a few are great and well worth the price of the book and the time it takes to read it, but some have to be taken with a grain of salt. They probably make sense if you come from the background of working on the Java API team, as the author does, but wouldn’t make much sense on any of the projects I have worked on. The problem is that all are presented as universal truths and only through experience can you tell which truly are and which can be ignored.

    I also feel that some of the items need to be tempered with just plain practical usefulness. I know that programming a certain way makes the code bullet proof from certain errors by not compiling if those errors are introduced, but if the code is quite a bit harder to understand and those errors are rare, is it really worth it? Also, some of the items are written as if everything you are writing is being published and supported publicly. If code and interfaces are just being used between two teams within the company, or even just on a single team, some of the logic used to describe why items are important don’t make as much sense. Again, I just feel that these are something that make complete sense if you are writing on the API team, but not necessarily in every other case.

    My final small complaint is that the author tends to be a bit wordy on some of the items, fully explaining out every nuance of the wrong way to do it, which tends to create noise in some explanations that are pretty heavy anyway.

    Overall, I would recommend the book, it has already made my programming better. An additional note is that I did not find any errors in the code examples or even the formatting, something that I find rare in programming books.

  9. J. Maines
    October 29th, 2010 at 12:56 | #9

    Rating

    This book is loaded with best practices for the seasoned Java programmer. Every Java developer should keep this book in their book bag. This book provides advice on many Java pitfalls that are often overlooked. The book has been updated with recommendations on many of the new features included in Java 5 & 6 that are particularly useful.

  10. J. D. Salazar
    October 29th, 2010 at 14:30 | #10

    Rating

    As a C++ developer, I always found the Effective C++ series invaluable. When I started developing in Java, I hoped for similar quality in this book and was not disappointed. This books if full of useful tips for developing in Java and also provides as a decent introduction to java.util.collections and java.util.concurrent.

  11. Charles Beckett
    October 30th, 2010 at 17:41 | #11

    Rating

    If you write Java for a living Bloch’s Effective Java could be your most useful purchase. The book assumes you know the language basics but that you want to make your code more effective: error free, easy to maintain. Block lays out 78 best practice in usage of the language. His style is lucid and direct with great examples. You can start in sequentially or skip around as it suits you – either way you’ll wind up improving your code.

    If you want an introduction or to study for certification look elsewhere. If you’re a professional and want to produce more professional work buy this book.

  12. Jeanne Boyarsky
    October 31st, 2010 at 10:26 | #12

    Rating

    The second edition of “Effective Java” is almost like a completely different book from the first. There were new chapters addressing Java 5 topics such as generics, enums and autoboxing. Existing patterns were rewritten for Java 5/6 – both conceptually and for the code examples. For example, overloading now address varargs. The number of items grew from 57 to 78 as well and the author removed the old ones that are obsolete.

    As a reference, chapter one provided a table to quickly find items on Java 5. The appendix provided a cross mapping to find items from the first edition in this copy.

    For those new to “Effective Java”, it is meant for intermediate to advanced Java developers. It provides best practices, recipes and idioms for working with Java. The author is good about listing both advantages and disadvantages to choose when to apply a tip.

    When thinking about my favorite chapter, I have trouble picking just one. I’m torn between the concurrency and enum chapters. The book goes beyond the common “use enums over constants” and goes into things like EnumBitSets.

    I learned a lot reading the first edition of this book and learned just as much reading the second. If you have the first edition, but this one anyway. And if you haven’t read the first edition, get your hands on the latest copy!

  13. Michael Ernest
    October 31st, 2010 at 21:21 | #13

    Rating

    Please see my review of the first edition for my general response. My opinion hasn’t changed with the second, so I’ll focus on what’s new in this review.

    The second edition was well worth the wait. The number of items are beefed up to 78 from 57. The chapter “Substitutes for C Constructs” is gone, but replaced by more contemporary material on “Generics” and “Enums and Annotations.” Some first edition items have been amended to address features new to Java since the first edition was released. Some new items also address concurrency, favoring it over traditional Java threads. As expected, the cases for each item are methodically and persuaisvely made. If you are particularly interested in concurrency, also consider Java Concurrency in Practice.

    The item discussions use boldface liberally to highlight key points, sometimes calling attention to arguments in the first edition that have been updated. If you’re skimming — the author in fact doesn’t encourage cover-to-cover reading — these highlights are useful attractors to important material you might otherwise gloss.

    It’s often helpful to have practices or insights you’ve earned on your own backed up by a reputable authority. Effective Java certainly helps with that. More importantly, the arguments that support his items are clear, easy to read, and compelling. Anyone proficient with Java would have to go a long way to find fault with them. In fact, it took considerable investigation to determine that one item from the first edition — “Provide a readResolve method when necessary” — was not the best advice for some cases. Bloch addresses that issue head-on in this edition, and provides its replacement (“For instance control, prefer enum types to readResolve”).

    As with the first edition, this one is a necessity for any serious Java developer.

  14. Gunnar Hillert
    November 1st, 2010 at 04:59 | #14

    Rating

    Effective Java, Second Edition by Joshua Bloch is certainly the best Java book I have read in a long time. As a disclaimer, I never read the first edition and I am thus unable to compare the two editions. Effective Java, Second Edition is a mostly easy and fun read providing you with many insights and best practices on how to use Java effectively. It certainly is not a book for the beginner just starting out learning Java. For that purpose you may want to take a look at Thinking in Java by Bruce Eckel instead. Nevertheless, Effective Java would serve as an excellent follow-up.

    In Effective Java, Joshua Bloch does a great job describing best practices that you as developer will find useful on a daily basis. For example, I really found his description of the builder pattern (Item 2, page 11) quite interesting. Another Item that fascinated me, was Item 15 (page 73) – “Minimize mutability”. Both items are part of a broader theme throughout the book that promotes creating code that is as immutable as possible. In that regard, reading the book will enable you to simply write better and safer code. The book also leads the way towards promoting functional programming techniques which will come in quite handily when developing multithreaded applications. Therefore, as a next book I may recommend reading Java Concurrency in Practice by Brian Goetz.

    Even for the experienced Java developer, Effective Java contains quite a few little eye openers. I for example was previously unaware of how static factory methods can simplify the creation of parameterized type instances using “type inference”. This is described on page 9 (Item 1). In the past I had always used something like this:

    List users = new ArrayList();

    But by using a static factory method you can do:

    List users = Helper.newArrayList();

    I thought that this was a pretty nifty example that may help making code a bit cleaner. What I also very much liked about Effective Java was that Joshua points out certain short-comings of the Java language itself and its APIs whenever applicable. For example, page 64 describes the inconsistent behavior between BigDecimal’s ‘equals’ method and its ‘compareTo’ method, and in item 41 (page 194) Joshua details the shortcomings of the List interface when using Autoboxing.

    While the vast majority of the book was very easy to read and to understand, I found that the chapter about bounded wildcards using generics (item 28) was a little difficult to grasp and I wished it were a bit more extensive. On the other side, the provided mnemonic is quite helpful: PECS – Producer-extends, Consumer-super.

    Overall, I highly recommend Effective Java, Second Edition which will continue to serve me, and likely you too, as an excellent reference resource.

  15. T. Powell
    November 2nd, 2010 at 16:58 | #15

    Rating

    This book will make you a better Java developer, period. It belongs on every Java developer’s bookshelf. The writing style is concise and to the point, but there are enough good code examples to illustrate each point. This is a great book for busy people who don’t have time to read a couple of hours a day. Each of the 70+ topics can be read during a lunch break. The author explains each topic in a way that is easy to understand for developers of all skill levels. I have been in IT for 12 years, and this is one of my top 5 favorite computer books.

Comments are closed.