To learn a new knowledge cannot be expected to read only one book, or two books can be fully mastered. There needs to be a step-by-step reading process. I recommend the OReilly published Java series books.
Here I just want to add that a lot of people learn Java from the book "Thinking in Java", but I think this book is not for beginners. I think the correct way to use this book should be as a supplementary reading. "Thinking in Java" is not a complete introduction of the entire system of Java, but a jump-style writing method, is a similar tips to the Java Many knowledge points for in-depth analysis and interpretation.
For beginners, it is best to find a book to get started in Java, but more complete and sequential introduction of Java syntax, object-oriented features, core class library and so on, while reading this book, you can sync to see "Thinking in Java", to deepen the understanding of Java and the use of the principle, At the same time you can fully understand the entire system of Java.
For a Java primer, Cai recommends OReilly's "Exploring Java, 2nd Edition" or "Java in a nutshell,2nd Edition (for C + + background)", and I have not read these two books. In fact, I think the electronic industry publishing house "Java 2 programming detailed" or "Java 2 from the introduction to proficient" is very good.
Of all the Java books, the most useful is not O ' Reilly's Java serials, but the most useful is the JDK's documentation! Almost all of the knowledge you want to get in the documentation is all there, the most important part of course is the Java Basic Class Library API documentation, is organized according to package, for each class has a detailed explanation, its inheritance relationship, whether the implementation of an interface, In what situations, it is also possible to find out all of its public properties and methods, the interpretation of each attribute, the purpose of each method, the invocation parameters, the meaning of the parameter, the type of the return value, and the exceptions that the method might throw, and so on. In this way, all the books on Java programming are simply introducing the use of some of the classes contained within a package in documentation, in a more comprehensible language, and in a well-organized way. So same, if you have enough power to learn Java libraries directly through documentation, then basically you don't need to look at other books. In addition, documentation is also a prerequisite for programming manuals, my desktop has three documentation shortcuts, The documentation of the documentation and j2sdkee1.3.1 of the documentation,servlet2.3 of j2sdk1.4.1 are respectively. With this three documentation, no other books are needed.
For Java WEB Programming, the core is to familiarize yourself with the HTTP protocol, which is not related to Java, after familiar with the HTTP protocol, you need to familiarize yourself with the Java implementation of the HTTP protocol class library, that is, the servlet API, so the most important thing is the servlet Api. Of course, for beginners, it's very difficult to learn web programming directly through the Servlet API, and I recommend O ' Reilly's Java Server Pages book to learn about Web programming.
EJB books, "Enterprise JavaBeans, 2nd Edition" is a very good book, EJB learning threshold is relatively high, difficult to get started, but this book completely reduced the difficulty of learning, particularly important point is that EJB learning needs to combine a kind of app Server, so while learning EJB, you must learn some kind of app Server synchronously, and this book is related to three books, respectively, weblogic6.1,websphere4.0 and JBoss3.0 The example of the deployment of the implementation. It's both theory and practice. As you learn about EJBS, you can do it while you look at it, and EJB learning becomes easier. Now the Chinese version of the book has been on the shelves, you may wish to see.
But the book also has a problem, is the version of the older, mainly speaking EJB1.1 norms and some EJB2.0 norms. and Ed Roman wrote "Mastering EJB 2.0" This book is written in accordance with the EJB2.0 specification, in simple language, covering all aspects of EJB programming, and there are many programming experience tips, is also learning EJB is very recommended by one of the books.
If it is a combination of Weblogic to learn Java EE, "Java application and Bea Weblogic Server" is definitely the first choice of reading, although it is the Weblogic6.0, still worth buying, this book is an official recommendation of Bea, the author is also the engineer of BEA company. Now the Chinese version is everywhere. This book combined with WebLogic introduced all aspects of Java EE Technology in the WebLogic platform development and deployment, practical guidance of a very strong significance.
After mastering the basics of Java platform and the knowledge of EE, the further is to learn how to use Oo method to design software, then you must learn "design mode." Sun has published a "Java EE core model", which is a must-have book for every architect who develops the software for the Java-based Enterprise platform. This book comprehensively introduced the Java EE architecture of various design patterns, is the designer must read books.