It is impossible to read only one or two books to learn a new knowledge. A step-by-step reading process is required. I recommend the Java series books published by oreilly.
Here I just want to add one point. Many people start with thinking in Java, but I think this book is not suitable for beginners. I think the correct way to use this book should be as an auxiliary reader. Thinking in Java is not a complete introduction to the entire java system, but a leaping writing method, it is a method similar to tips to deeply analyze and explain many Java knowledge points.
For beginners, it is best to find a book on getting started with Java, but it introduces Java syntax, object-oriented features, core class libraries, and so on in sequence. while reading this book, let's take a look at thinking in Java to deepen our understanding of Java and how it works. At the same time, we can fully understand the entire Java System.
For getting started books on Java, Cai xuexiao recommends oreilly's cutting ing Java, 2nd edition, or Java in a nutshell, 2nd edition (for C ++ background). I have not read these two books. In fact, I think the Electronic Industry Press's "Java 2 programming details" or "Java 2 from entry to mastery" is very good.
Among all the Java books, the most useful is not o'reilly's Java serials. The most useful is JDK documentation! Almost all the knowledge you want to obtain is available in documentation. The most important part is the API documentation of the Java basic class library, which is organized by package, each class has a detailed explanation, its inheritance relationship, whether an interface is implemented, and where can all its public attributes and methods be found, the interpretation and meaning of each attribute, the purpose of each method, the called parameter, the meaning of the parameter, the type of the returned value, and the exceptions that the method may throw. In this way, all the books on Java programming are actually just in a relatively easy-to-understand language, and a good way to introduce the usage of some classes in a package in documentation. As a result, if you have enough ability to directly learn Java class libraries through documentation, you do not need to read other books. In addition, documentation is also a required manual for programming. There are three documentation shortcuts on my desktop: documentation of j2sdk1.4.1, documentation of servlet2.3, and documentation of j2sdkee1.3.1. With these three documentations, no other books are needed.
For Java Web programming, the core thing is to be familiar with and master the HTTP protocol, which has nothing to do with Java. After being familiar with the HTTP protocol, you need to be familiar with Java class libraries for implementing HTTP protocol, that is, Servlet APIs. The most important thing is servlet APIs. Of course, it is very difficult for beginners to learn web programming directly through servlet APIs. I recommend o'reilly's Java Server Pages book to learn web programming.
Among EJB books, Enterprise Java Beans ?, 2nd edition is a very good book. The learning threshold of EJB is relatively high and it is difficult to get started. However, this book completely reduces the difficulty of learning. It is particularly important to note that, EJB learning needs to be combined with the specific implementation of an app server. Therefore, while learning EJB, you must learn an app server synchronously. This book has three related books, these are the examples in the above deployment books of weblogic6.1, websphere4.0, and jboss3.0 respectively. There are both theories and practices. While learning EJB, you can view and do it while learning it, and learning EJB will become very easy.
However, this book also has a problem, that is, the old version mainly focuses on the ejb1.1 specification and some ejb2.0 specifications. The mastering EJB 2.0 book written by Ed Roman is completely written in accordance with ejb2.0 specifications. It covers all aspects of EJB programming and has a lot of programming experience tips, it is also one of the most recommended books for learning EJB.
If you use WebLogic to learn J2EE, the J2EE application and BEA WebLogic Server is definitely the first choice. Although it is about weblogic6.0, it is worth buying, this book is officially recommended by BEA, and the author is also an engineer of Bea. Now the Chinese version is everywhere. This book introduces the development and deployment of various J2EE technologies on the Weblogic Platform in combination with WebLogic, which has great practical guidance significance.
After having mastered the basic knowledge of the Java platform and the knowledge of J2EE, we should learn how to use the OO method to design the software, so we must learn the "Design Pattern ". Sun has published a J2EE Core Model, which is an essential book for architects who develop Java Enterprise platform software. This book comprehensively introduces various design modes of the J2EE architecture and is a must-read book for designers.