8 Simple sections to open the Java language Learning path attached Java learning Book list _java

Source: Internet
Author: User
Tags data structures http request socket stmt java web java reference

Before we recommended the Java language reading books, the following for you to learn from which aspects of the Java language to start learning, the specific contents are as follows

1. Java Language Basics

When it comes to the basics of Java language Learning, you will certainly recommend Bruce Eckel's thinking in Java. It is a very profound technical book written, the basic part of the Java language is basically no other book can surpass it. Bruce Eckel, author of the book, is known as a genius speculator on the web, and the author's thinking in C + + won the Softwaredevelopment Jolt Award Best Book Award in 1995, "Thinking in Java" Was named 1999 Java World "favorite readers Welcome book", and won the editor's preferred Book Award. Since 1986, the author has published more than 150 computer technology articles, published 6 books (4 of which are about C + +) and made hundreds of lectures worldwide. He is the author of "Thinking in Java", "thinking in C + +", "C + + Inside & Out" Using C + + and "thinking in Patterns", as well as "black Belt C + +" anthology Edit. His book is referred to by the reader as "the best Java reference book ... Absolutely shocking. "The smartest choice to buy Java reference books"; "The best Programming Guide I've ever seen." The writer's extraordinary talent, the ability to transcend language, has led the author to be selected as one of the 10 most closely related to Java during the 10 years of Java development.

"Thinking in Java" describes all aspects of the Java language, and many of the Java language veterans have evaluated "This is a book that is pretty ugly in the Java language." The book deals with many of the details of the Java language, each of which is quite profound. You can see the "ugly" Java language through this book.

There are a lot of videos on the web about the Java language, among which there is no junk. "Onge-java language" may be your only choice to learn the basics of the Java language, which is largely explained in the book "Thinking in Java," which has many interesting jokes from Mr. Weng. I am very lucky to learn to start from this video. It includes 30, and I've seen it 3 times in total.

However, for beginners I do not recommend the use of "thinking in Java", I recommend the Prentice Hall PTR "core Java 2" in the country called "Java 2 core technology", is currently the seventh edition. On the Internet, everyone can download to the electronic version. OReilly's "Java In a Nutshell" is also a good choice. After reading the above two, you can look at the Onge teacher's video, then you can study "thinking in Java".

2. Java Data Structure

There are very few books on Java data structures on the market. Roughly Apress's "Java Collections", Jones and Bartlett's "Data Structures in Java", "object-oriented Data Structures Using Java" and PR Entice Hall published "Data Structures and algorithms in Java" (Dec 19, 2005) and one is the data structures and algorithms with object-or iented design Patterns in Java. Luckily my first English book is Apress's "Java Collections" (This book may not have Chinese version at home-only download English version), very good, very simple, is a complete Java Collections API introduction of the book , with an uncommon example of an extended API. This is the only good book I recommend you to learn about Java data structures. Other Jones and Bartlett of the two countries seem to have a Chinese version, want to see you can also see.

After you've finished learning the API, you can look at the corresponding classes in the Java.util package. But only after you've studied design patterns can you fully understand the entire Java collections Framework. The Java Collections framework uses many well-known design patterns such as iterator (iterator) mode, factory method pattern, adorner mode, adapter mode, and so on. By studying the source code of the data structure in the Java.util package, you can see that the notorious properties class is designed and may have the ability to design simple data structures.

The so-called learning endless, after learning Sun provided the Java Collections Framework, you can study the Apche of another Java collections framework, very interesting oh. Two frameworks that complement each other.

Before you learn and study Java collections, I suggest that the Java collections consists of the following three parts: interface (Interface), implementation (Implemention), and Algorithm (algorithm).

1. The interface consists of list, Set, queue, and Map. The List, Se T, and queue are sub-interfaces of the collection interface.

2. Implementation is primarily a concrete class that implements these interfaces. such as implementing the ArrayList, LinkedList, Stack and vector of the list interface, implementing the HashSet, TreeSet and Linkedhashset of the set interface, and implementing the queue interface Priorityqueue, Synchronousqueue and so on, implementation of the map interface HashMap, TreeMap, Hashtable, Properties, Weakhashmap and so on.

3. The algorithm is mainly provided by the arrays class and the collections class, which is the core of the entire Java Collection framework algorithm. Support various types of sorting, lookup and other common operations.

The Java collections contains two versions of the data structure, primarily the original data structure that supports synchronization, and data structures that later do not support synchronization.

The Java Collection framework supports sorting using the comparator and comparable interfaces. It also provides the new and old two versions of Iterators iterator and Enumeraton, and how they are converted, and so on.

The Obserable interface and the Observer class in the Java.util package are the core of the explorer model.

......

3. Java IO

The only books on the market for IO are only two of OReilly's publications, Elliotte Rusty Harold. The style of the two books is basically consistent, recommended reading is the first edition of "Jvava I/O", speak more shallow, relatively concentrated content, examples are also many. The second edition was published in May this year, and I was privileged to download the second edition on the web. The large ――726 page (I took two weeks), this time will be nio and IO and together, but also include the J2ME part, but the serial port, and the communication part of the interface as if the class library support is not enough, they can not actually operate.

With the first edition of "Jvava I/O" together with the oreilly also has a "Jvava NIO", is also very good oh.

After reading "Jvava I/O" and "Jvava NIO" in turn, we can study the source code in the Java.io package. Before you study the source code, I give some hints:

The Java IO package mainly includes:

1. Two streams: Stream of bytes (byte stream) and character stream (character stream), these two streams do not exist the so-called who replaces who, who is higher than the said, they complement each other, but the focus is different.
2. Two kinds of symmetry: 1. The symmetry of the byte stream and the character streams; 2. The symmetry of input and output.
3. A bridge: The InputStreamReader and outputstreamwriter that turn byte flows into character streams.

One must note:

1. PipedInputStream and Pipedoutputstrem are two more interesting classes.
2. A stream that supports buffered is a class that we often use.
3. Adorner (decorator) mode is the most famous application in Java for IO design. Carefully study the relationship between the filter flow and specific flow, look at the design patterns of books. I'm sure you'll get what you've been given.
4. Learn Good IO package, is research net package, RMI package ... The basis of Oh!

4. Java Database

There are too many books in the database, too bad! This aspect of the book I have basically studied, recommended you to see Apress of the "JDBC Recipes a Problem Solution approach" is very good, foreign countries in late 2005 only published, (there seems to be no Chinese version, but out of the Chinese version is not necessarily worth looking at- The country often translated foreign books to a mess, unsightly, but we are really lucky, the Internet has an electronic version. It's worth a visit. Recommended that I read the first more satisfactory ――wiley published the "Java Database Bible", said very good! The "JDBC API Tutorial Andrefernece" introduced by Sun's own JDBC API is also good. My second JDBC is the study of this set of APIs.

But these books are now a relatively superficial book of API apps. I will give you the opportunity to introduce the JDBC API and the implementation of JDBC internal details of the book! I work as soon as possible, and hope to get everyone's support!

By the way, give a hint to the friend who is learning jdbc:

JDBC Learning and use is mainly the API, the use of the process is extremely simple, the following is the general process of using JDBC:
1. Load a database driver (driver Class), usually using Class.forName ("Driver class name");
2. Connecting the database-
Connection con = drivermanager.getconnection (Url,username,password);
3. Get conversation ――statement stmt = Con.createstatement ();
4. Perform operation ――result rs = stmt.executequery ("SQL query statement");
5. Processing Results-

while (Rs.next ()) {

String col1 = rs.getstring (1);

......

}

It's easy! What can be changed throughout JDBC is:
1. Statement, PreparedStatement, and CallableStatement can be created by the connection object to create three types of statement.
2. You can create multiple types of resultset: support for one-way movement and free movement, updatable and not updatable, support for different levels of transactions ...
3. Batch processing of data entry.
4. Operations of special types (BLOBs, Clob, arrary, and ref, Struct) in the result set.
5. These special types of input databases.
6. Operation of special result set (CachedRowSet, Jdbcrowset, Webrowset) in Javax.sql package.
7. The other is a DataSource, also very simple! A managed object in the Java EE

It's easy! I'm sure everyone will soon conquer JDBC.

5. Java Network Programming

Network Programming-a mysterious, challenging direction. But before talking about Java network programming, first of all, thanks to the developers of sun, because their brilliant vision, intelligent architecture, so that the vast number of Java programmers to learn Java network programming is extremely simple.

Java network programming aspects of the book, I recommend O ' Reilly's "Java Network Programming", is now the third edition, the previous version of the market must have! The internet has a third version of the electronic version, published abroad 2004, 706 pages Oh! Speak very full, more in-depth, too deep may be due to sun some things are not completely open, so it is difficult to speak, interested can download to see! The second or O ' Reilly 1998 published "Java Distributed Computing", the basic part of a more detailed, the following examples are worth studying.

Before you read these books, give us a little hint:

Java network programming is relatively simple, the introduction is very fast. Java network programming mainly includes two parts: 1. Socket;2. The URL part. However, the second part is entirely based on the first part.
1. Socket includes client socket and server-side serversocket. There is Datagramsocket and Datagrampacket, which corresponds to the UDP communication protocol. In short, the socket section is the basis for establishing other advanced protocols.
2. The URL class is a network resource locator, usually with specific network protocols such as Http,ftp,telnet ... Related. This class enables you to connect to resources on the network through which you can read network resources in the form of streams (InputStream) in the IO package, and by using its OpenConnection method, you can open a connection, where you can openstream not only read operations, You can also complete the write operation.

Java network programming generally includes the above two parts. The network programming and IO as well as the multithreading part is very close, before studying this part everybody must understand to these two parts to be quite thorough.

Learn the above section you can study the java.net package in connection with this source code! It is still too early for the Institute to have the source code. Include in the entire net package: ContentHandlerFactory, URLStreamHandlerFactory, URLStreamHandler, URLClassLoader and other auxiliary classes, They constitute the framework of java.net network programming, through the study of its source code, you can not only quickly understand the java.net package, but also for the future expansion of the package to lay a foundation, and even the way to apply this thinking to their own projects.

That's all you need to know about the java.net package is 60%, and some of the other things you can do is open your JDK installation directory using Jdecompiler and the like \jdkxxx\jre\ Lib directory rt.jar, with software such as WinRAR to open its sun.net package, decompile all the files, it is the URL class work details. When you have finished studying the Sun.net package, you will be familiar with the whole network programming.

Everything looks like we've got a good command of Web programming. Actually, just started, want to go deep, please continue! Many excellent network programming libraries and even software can "add skill" to our network. such as Apache Httpcore and Httpconnection are two and HTTP protocol-related libraries; jgroups is a must-read library for the research of distributed communication and group communication. Then we can look at Peer-to-peer packages like Sun's jxta, It may be the future standard of point-to-point communication in Java platform Oh! Then you can study the mature, use extremely wide peer-to-peer software azureus! Www.sourceforge.net can be downloaded to!

The journey begins with a journey! Just Do it! (I've only studied net packages for now, and others will continue to go deep in the near future.) For some reason, Sun Company has no other implementation details of the public net, and when it allows the source code to be studied in textual form, and allows it to be written in a way that is not publicly available, I would like to write a book on Java Web programming to chiselled readers!! )

6. servlet and JSP

The Servlet, JSP book is also Montreal! Only two or three are worth recommending. Real Push Addison Wiley "Servlets and JavaServer pages:the java Technology Web Tier", but also a very thick oh! Foreign 2003 published, 784 pages, speak more complete, examples are many, especially the eighth chapter of filter, give a few good examples. All the other books I've seen about servlet and JSP are not so deep! (Maybe I didn't see it). O ' Reilly's "Java Servlet Programming" and "Java Server Pages" are relatively understood, and can be read!

Before you learn the servlet and JSP, I'd like to remind you:

In essence, a servlet is a server-side program that implements the Servlet interface, which is deployed on the server side. It can be written like any other Java application, it can manipulate the database, can manipulate local files, and can connect to local EJBS ... The general process for writing servlet programs is:

1. Inheriting a HttpServlet class;
2. Covering its doget and Dopost methods;
3. Internal operation method Parameters HttpServletRequest and HttpServletResponse in the covering method.
4. Read request using HttpServletRequest. With HttpServletRequest you can manipulate the HTTP protocol header, get the requested action method, get the requested path, get the requested string, and request information about the customer, More important you can get cookies and httpsession these two objects.
5. Using cookies, you can manipulate the "sweetheart" object or write it into HttpServletResponse.
6. Output information to the customer can use HttpServletResponse. Using HttpServletResponse, you can write a variety of protocol headers, add cookies, redirect other URLs, and send a status code to the customer that HTTP protocol can be sent.
7. Use HttpSession to accomplish any function you wish to achieve in the session.
The servlet also provides some event and event listeners (simple observer mode). There are filters (filter) and wrappers (Servletrequestwrapper, Servletresponsewrapper)-The use of simple streams and the use of adorner patterns.

Learning Sevlet, JSP must be deployed to the server, remember the usual file deployment steps and parameters and how to use in the program.

After a full understanding of the servlet, learning JSP is relatively easy! JSP is built entirely on the servlet, and is designed to cater to programmers who like to embed scripts in HTML documents such as Web programming languages such as PHP! It's also quite easy to learn!

Everything seems so calm, easy to learn! There is a complex mechanism behind simple appearances. To thoroughly study the servlet and JSP, you have to study the implementation of open source software such as Tomcat. It is nothing more than a server, when customers use Web pages through the HTTP protocol to send a request to the server, the server will this HTTP request into the corresponding HttpServletRequest object, call you write a servlet, You must have manipulated this httpservletrequest in your servlet and manipulated the HttpServletResponse. The server uses the HTTP protocol to send this httpservletresponse to your browser as required by the HTTP protocol! After the server-side JSP page is requested by the client, Tomcat uses the compiler software to compile the JSP file using the template in the javax.servlet.jsp package, which is compiled with a servlet! Future operations and servlet exactly the same Oh!

On the basis of servlet and JSP, the so-called advanced technology: Jstl,struts ... Nothing more than the use of some tags and mvc patterns.

Go ahead, move on! Victory is in the front!!

7. Multithreading

A very mysterious looking, but easy to get started, difficult to master the direction!

I recommend two books that I feel very good. First of all, my first instinct to read this book, Sams 1998 published "Java Thread Programming", write a good, very easy to read, I have time to often read the notes! You know how good you see it! The second oreilly three published "Java Threads", the latest is 2004 version, the domestic seems to have Chinese version, recommend you or read English version of it! The book talks about the n directions associated with multithreading, such as Io, Swing, collection, and so on.

Let's give you a hint! There are not many classes in the Java class library that are related to multithreading, mainly: Thread, Threadgroup, and Threadlocal and inheritablethreadlocal four classes and a runnable interface; keyword synchronize, Volatile and the object's wait, notify, Notifyall Method!
1 Thread is the core class of multithreading, providing a series of ways to create and manipulate multithreading.
2 Threadgroup is a tool class for managing thread.
3 Threadlocal and inheritablethreadlocal a class that stores thread objects similar to the Safe deposit box function for thread!
4 runnable, needless to say!
5 Synchronize is the Sync method and the core of the sync block Oh! When multiple threads call this method, only one thread can use this method and other methods to block, guaranteeing the internal state integrity of the object being manipulated. When a thread invokes a method or block with a synchronize, it gets an object lock on the object, frees the object lock after the operation in the block, and allows other objects to continue.
6 Wait, notify, notifyall provide an effective waiting/notification mechanism. Each object in the Java language has a lounge, any thread that is not satisfied with the state of the object in which it operates is resting in the rest of the object's lounge, releasing the object lock, and after the other thread has manipulated the object, wakes the threads in the lounge and then checks the condition to perform the appropriate action when the condition is satisfied.

Multithreading roughly on so much basis! It's simple! This for a real programmer should be not enough, real multithreading to have mastered, please study java.util.concurrent bag it! Master Doug Lea's work, originally a library of open source consistency programming, was later incorporated into the Java class Library by Sun. There is also another version of the library on the author's website! A good thing worth studying! Hibernation, OPENJMS and other open-source software are using this package!

8. Design pattern

When it comes to design patterns, many people would recommend Gof, the book is a five-star recommendation on Amzon. But for the learning of Java, especially Java beginners, I do not recommend this book. The main example of the book is the basic C + +, a lot of details are not well enough to tell.

I recommend to you the first is Dr. Shanhong's "Java and model", it is the first Chinese to write about the design pattern of books, write more interesting, the integration of a lot of Chinese culture and ideas, examples, class diagrams are more, and relatively simple! Very good Primer book-Big again!

Secondly, I recommend Wiley Publishing "pattern in Java" a set of three, I saw the first, as if the second book is not good, the third is not bad!

The third is the Chinese translation version of the multithreaded mode (very rare Chinese translation version) China Railway Publishing house in 2003, "Java Multithreaded design mode", the multithreaded mode is very simple, with a large number of legends, each chapter has a problem, and finally have the answer! I study multithreading mode is started by it!

Fourth, this year, the head of the first series of the head of design, the head of the first series of books, the advantages of a large number of class diagrams, rich examples, interesting annotations, is worth buying!

Second in the direction of the Java EE you can study reading Addison Wesley 2002 published "Patterns of Enterprise Application Architecture", the works of many big shots, talk about enterprise message integration! Sun provides the "Java PATTERNS SL500" is also very good! Late recommended that a Amzon 4 star half of the "Holub on Patterns", the master's work, provides, is worth studying examples, but to the top four not very familiar readers, it is best not to read it! May make you more tired!

I study the design pattern after a very tortuous route, and then read about 20, Dr. Shanhong's "Java and Mode" I read 4 times, but also exclude the first time I do not understand the basic look! Remember the teacher told us about the Gof of the book, as an elective, I and their computer department of Master's, Ph. D., in the last class of 40-50 people, no more than 3 person understand, I also did not understand any point (the basis of the poor--mainly I do not understand the C + + language), with my not lost character, I think I understand the Java language can also, I borrowed the "Java and mode", the result is basically not read. It is very fortunate to read the study three o'clock, heard the Ober La Jonan teacher about Java OOP Language lectures, I understand the combination of books and other models of three design patterns, have a strong interest in other models and to conquer its desire! After work I bought the first is "Java and Mode", the first time spent 2 months to study this 1000-page of the big, and then the third time around 15 days can be done, note a large book! From now on.

Choose the right book and immerse yourself in the study. I'm sure I'll get started soon!

Learning the Java language 8 simple parts, this is just the beginning of our study of the Java language! These all understand a Java programmer at best, the road behind is very long! We can continue to study database implementation source code, servlet Server source code, RMI, EJB, JNDI, aspect-oriented programming, refactoring, ant tools, Eclipse Tools, spring Tools, JBoss, JOnAS, Apache Geronimo and other Java server! To study these you might become an excellent EE architecture! You can continue to study the profiler, compiler, JNode (Java-written operating system) ...

The above is the entire content of this article, I hope to help you learn, but also hope that we support the cloud habitat community.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.