I recently bought Effective Java Second Edition by Joshua Bloch. When I started to read it, I was shocked. How come I had NOT read this book before?
The book presents 78 items. Each of them prescribes a best practice. For example : “Item 21 : Use enums instead of int constants”. Then a clear explanation demonstrates why this is a best practice. It also contains some examples of good and bad code to convince the skeptics.
There are certain basic concepts in Java that are misunderstood by some developers. For example there are coders that don’t know how to write equals() and hashCode() methods correctly. Joshua tackles this point in items 8 and 9. He explains in details the contract of the equals() method and gives a simple recipe to write good hashCode() methods.
The chapters added since the first edition are targeting the novelties that came with the releases of Java 1.5 and 1.6. The ones that are covering enums and generics are very interesting, especially if you started to learn Java with an older release.
The thing I liked the most about this book was the constant feeling of learning something while reading it. This is not something that happens a lot with books about a familiar programming language.
This book is not intended for people who are starting using Java. But if you are feeling that you have grasped the language enough, it will definitely help you to improve your way of coding.
And for those who think that they master Java, they will surely learn invaluable lessons in this book.
If there is a book that a Java developer should read, it’s definitely this one.
The book presents 78 items. Each of them prescribes a best practice. For example : “Item 21 : Use enums instead of int constants”. Then a clear explanation demonstrates why this is a best practice. It also contains some examples of good and bad code to convince the skeptics.
There are certain basic concepts in Java that are misunderstood by some developers. For example there are coders that don’t know how to write equals() and hashCode() methods correctly. Joshua tackles this point in items 8 and 9. He explains in details the contract of the equals() method and gives a simple recipe to write good hashCode() methods.
The chapters added since the first edition are targeting the novelties that came with the releases of Java 1.5 and 1.6. The ones that are covering enums and generics are very interesting, especially if you started to learn Java with an older release.
The thing I liked the most about this book was the constant feeling of learning something while reading it. This is not something that happens a lot with books about a familiar programming language.
This book is not intended for people who are starting using Java. But if you are feeling that you have grasped the language enough, it will definitely help you to improve your way of coding.
And for those who think that they master Java, they will surely learn invaluable lessons in this book.
If there is a book that a Java developer should read, it’s definitely this one.