Java source code and recommended books to read!

1. Java language based on

On the basis of Java language learning books, I am sure you will recommend Bruce Eckel's "Thinking in Java". It is written in a very profound technical books, Java language is not based on any other part of the capital of a book can go beyond it. Bruce Eckel, author of the book on the network known as the genius of the speculators, the author of "Thinking in C + +" in 1995 won the best SoftwareDevelopment Jolt Award winning book, "Thinking in Java" was named in 1999 Java World " readers favorite books, "and won the Editor's Choice Book Award. The author has so far in 1986, has published more than 150 computer technology articles, published six books (of which four are on the C + + of), and several hundred in the world to do his presentation. He is "Thinking in Java", "Thinking in C ++"," C + + Inside & Out" "Using C + +" and "Thinking in Patterns" author, is also a "Black Belt C + +" Collection editor. Readers of his book was called "the best Java reference book is absolutely shocking ... ..."; "Java reference books to buy the most sensible choice"; "I have seen the best of the Programming Guide." The author's extraordinary talent, great ability to cross-language, so Java was selected as the author 10 years with the development of Java are most closely related to one of the 10 individual structures.

"Thinking in Java" on all aspects of the Java language, Java language, many veterans are rating, "This is a Java language will be made a very ugly book." The book touched on many of the details of java language, each are quite profound. Through this book, you can see the "ugly" java language.

Network on the java language on the video many, many, of which there is rubbish out of the ordinary. "Weng Kai-JAVA language" may be the basis of your language learning java the only option, in accordance with the basic seminar "Thinking in Java" on this book, in which great teachers have a lot of interesting Weng joke. I was lucky to learn from this video is the beginning. Including 30, I saw a total of 3 times.

However, I do not recommend for beginners to use "Thinking in Java", I am more of Prentice Hall PTR Recommended "Core Java 2" internally known as "Java 2 core technology," is now the seventh edition. We all network to the electronic version can be downloaded. Oreilly's "Java in a nutshell" is also a good choice. After reading more than two, you can take a look at the video the teacher Weng Chan, and then can study the "Thinking in Java" the.

2. Java data structure

Java data structures available in the market on the book itself is very small few. Generally, there are APress's "Java Collections", Jones and Bartlett's "Data Structures in Java", "Object-oriented Data Structures Using Java" published by Prentice Hall, as well as "Data Structures and Algorithms in Java" (Dec 19, 2005) there is a this is the "Data Structures And Algorithms With Object-oriented Design Patterns In Java". I was lucky the first English APress book is the "Java Collections" (This book may not be at home there is no Chinese version - download the English version only), and very good, words are regulations, which is very simple, a completely Java Collections API introduced the book, of which there are extraordinary examples of extended API. This is what I recommend that you study the data structure java only a good book. Jones and Bartlett other two that seemed to have a domestic Chinese, want to see if you can.

End API in learning, you can look at the java.util package of the corresponding category. But only in the study design mode you can be fully understood throughout the Java Collections Framework. Java Collections Framework to use a lot of well-known design patterns such as: Iterator (Iterator) mode, the factory method patterns, decorative mode, the adapter mode and so on. By studying data structure java.util package source code, you can know that the notorious Properties Design category, and at the same time may be a simple basic design with the ability of a data structure.

The so-called life-long learning, to learn End Sun provides a Java Collections Framework, you can study Apche another Java Collections Framework, oh, very interesting. Two complementary Framework.

In all the study, research, Java Collections, I prompted some major Java Collections include the following three parts: interface (Interface), to achieve (Implemention) and algorithms (Algorithm).

1. The main interface List, Set, Queue, and Map. List, Se t is the Collection interface and the Queue sub-interface.

2. The realization of the main achievement of these specific types of interfaces. List interfaces, such as the realization of ArrayList, LinkedList, Stack and Vector; achieve Set Interface HashSet, TreeSet and LinkedHashSet; achieve Queue interface PriorityQueue, SynchronousQueue etc.; Map interface to achieve the HashMap, TreeMap, Hashtable, Properties, WeakHashMap and so on.

3. Algorithm mainly by Arrays and Collections category category provided, it is the whole of the Java Collection Framework core algorithm. Support various types of sorting, search and other common operations.

Java Collections contains two versions of the data structure, primarily to support the synchronization of the original data structure and later do not support the synchronization of the data structure.

Java Collection Framework in the use of Comparator and Comparable interfaces to support the sort. At the same time to provide two versions of the old and the new iterator Iterator and Enumeraton, and how they convert so.

In the java.util package Obserable the Observer interface and model is the core of study.

... ...

3. Java IO

Books available on the IO also Oreilly publishing only two are Elliotte Rusty Harold's book. Two books are basically the same style, I recommend you to read the first edition of "Jvava I / O", has stood out simple, content is relatively concentrated, there are many examples. The second edition in May this year, it published abroad, I am very fortunate in my network to download the second edition, speaks extremely detailed - 726 pages of big (and I of a two-week), this will be and with NIO and IO , but also part of the J2ME, but the serial port, parallel communication library to support part of it seems not enough, he could not practice.

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

We read in order "Jvava I / O" and "Jvava NIO", the package to study the source code of the. In our study the source code to the point before I am prompted to:

Java-io package include:

1. Two streams: byte stream (byte Stream) and the character stream (character stream), these two streams of whom there is no substitute for the so-called who, who said high-level than anyone else, and they complement each other, but different focus .

2. Two kinds of symmetry: 1. Byte stream, the characters of the symmetric flow; 2. Input and output symmetry.

3. A bridge: The character stream into a byte transfer the InputStreamReader and OutputStreamWriter.

One must pay attention to:

1. PipedInputStream and PipedOutputStrem are two more interesting categories.

2. Buffered streaming support is a frequently-used category.

3. Decorative device (Decorator) model in the application of java is the most famous design for io. Filter flow carefully study the relationship between the specific flow, multi-view design pattern books. I believe you will be received.

4. Io study package, is to examine the net bag, rmi package basis ... ... Oh!

4. Java database

Database has been far too many books, but also a Too bad too rotten ! In this regard which I have studied the basic, recommended by Apress you see the "JDBC Recipes A Problem Solution Approach" is pretty good, only published abroad by the end of 2005, (as if there were no domestic Chinese version, but a Chinese version does not necessarily worth watching - The book often foreign translation mess, offensive) but we are really lucky to have the electronic version of the network's. Worth a visit. I do not recommend the first satisfactory - Wiley Publishing's "Java Database Bible", very good! Sun's own presentation on the JDBC API that the "JDBC API Tutorial andRefernece" is not bad. My second was to study the JDBC set of API.

However, these books are relatively superficial application of the API book. I will give you the opportunity to bring JDBC API and the JDBC Introduction to achieve the internal details of the book! Efforts as soon as possible, I also hope that everyone's support!

To study the way that JDBC friend Tip:

Learning and use of JDBC is this API, its use is extremely simple, is the use of JDBC the following general process:

1. To load a database driver (Driver type), normally use Class.forName ( "Driver class name");

2. To connect the database --

Connection con = DriverManager.getConnection (url, username, password);

3. To be conversational - Statement stmt = con.createStatement ();

4. The implementation of the operation - Result rs = stmt.executeQuery ( "SQL query");

5. To deal with the results --

while ( ()) (

String col1 = rs.getString (1);

... ...


Simple! JDBC can change the whole general is:

1. Can be created by the Connection object Statement, PreparedStatement and CallableStatement to create three types of Statement.

2. Can create various types of ResultSet: support for one-way movement and free movement; renewable and non-renewable; support different levels of trading ... ..

3. The batch data entry.

4. The result of a special type of focus (Blob, Clob, Arrary and Ref, Struct) out of operation.

5. These special types of input data.

6. Javax.sql result set special package (CachedRowSet, JdbcRowSet, WebRowSet) operation.

7. The other is a DataSource, it is very simple! In a J2EE managed object

Simple! I believe we will soon conquer the JDBC.

5. Java Network Programming

Network programming - a mysterious and challenging direction. However, before talking about Java network programming to thank first of all, Sun's developers, because they are the idea of genius, full of the wisdom of the structure, so that the majority of programmers java programming learn java very simple network.

Java network programming books, I recommend O'Reilly's "Java Network Programming", is already the third edition of a previous version of the market certainly has! The network had the electronic version of the third edition, published abroad in 2004, 706 Oh! Very wide, more in-depth, in detail may be due to some things Sun did not fully open, so bad about it, interested can download and see! O'Reilly 1998 or the second was published in the "Java distributed computing", the basis for a more detailed written part, or the back of examples worthy of study.

In reading these books before you give us some tips:

java network programming is relatively simple in fact, entry is also very very soon. java network programming primarily consists of two parts: 1.Socket; 2.URL part. But the second part is completely built on the basis of the first part.

1. Socket including Socket client and server-side ServerSocket. DatagramSocket and there is DatagramPacket, it corresponds to the UDP communication protocol. In short, Socket part of the establishment of other high-level agreement.

2. URL is a network resource locator, usually and specific network protocols such as HTTP, FTP, Telnet ... ... relevant. Can be connected through a network of such resources, through its openStream can flow io package (InputStream) to read the form of network resources; OpenConnection through its methods, you can open a connection, in this connection can be read not only the completion of the operation can also be written to complete the operation.

Java network programming, including more than roughly two parts. IO, as well as network programming and multi-threaded part of a very close, in this part of the learning, we must compare on a thorough understanding of these two parts.

Studied more than you can study part of the package related to the source code! Institute for some source code is still too early. Net in the entire package includes: ContentHandlerFactory, URLStreamHandlerFactory, URLStreamHandler, URLClassLoader category, such as auxiliary, which constitute the framework for network programming through its source code, you can quickly understand not only the package, but also after lay the foundation for the expansion of the package, and even this way of thinking can be applied to their own projects.

The end of the package you should be only 60 percent know, some you can use like JDecompiler decompile the software to open your JDK installation directory \ jdkxxx \ jre \ lib directory of rt.jar, the use of WinRAR type of software package to open it, decompile all the documents, it is the URL details of type of work. When End of the package, you will on the whole are very familiar with network programming is very familiar with the.

We all seem to have a good network programming is. In fact, it has just begun, to depth, please continue it! Network, many excellent and even the network programming library software can do for us "to add ability." HttpCore such as Apache and the two HTTPConnection and HTTP-related libraries; JGroups distributed communication research, library reading group communication; then we can P2P software package, such as Sun's JXTA, it may be java platform point-to-point communications standard future Oh! Then you can study a very, very mature, very broad use of P2P software Azureus! Can be downloaded to!

Journey of a thousand miles begins with a single step! Just do it! (Currently I have only studied the net package, other in the near future will continue to. Sun for some reason the company did not disclose net realization of the other details, in its source code to allow to study the form of text, as well as to allow will be the realization that they are not open to write the book, I very much hope that a java network programming books, readers to supper!!)
6. Servlet and JSP

Servlet, JSP is the floor of the book! Should be recommended only 23. Addison Wiley is pushing the "Servlets and JavaServer pages: The J2EE Technology Web Tier", it is a very thick Oh! Abroad, published in 2003, 784 pages, has stood the whole, there are many examples, especially in Chapter VIII of the Filter, to cite a few good examples. I have seen all other Servlet and JSP on the books are not so deep! (May be I do not see it). O'reilly's "Java Servlet Programming" and "Java Server Pages" a number of relatively well understood, you can read!

Learning in the Servlet and Jsp you before, I would like to remind you:

In essence, is a realization that the Servlet interface Servlet, deployed in the server-side program of the server-side only! It can be written as any other java applications like the preparation, it can operate the database, you can operate a local file, you can connect the local EJB ... ... procedures for the preparation of the general process Servlet as follows:

1. HttpServlet inherit a category;

2. The coverage of its doGet, doPost methodology;

3. In the coverage of methods of operation of the internal parameters of HttpServletRequest and HttpServletResponse.

4. Read request using HttpServletRequest. You can use HttpServletRequest agreement operation agreement Http head, can be requested operation method, can be the path of the request, the request can be a string, as well as customer-related information request, you can mainly be both Cookie and HttpSession objects.

5. You can use the operation Cookie "sweetheart" or to write the object in the HttpServletResponse.

6. Output information to customers can use the HttpServletResponse. HttpServletResponse to use various types of agreements can be written into the head, can increase the Cookie, can be redirected to other URL, can be sent to the customer agreement Http status code.

7. The use of HttpSession in the conversation you want to complete the realization of any function.

Servlet also provided at the same time a number of events and event listener (no more than a simple observer pattern). There is a filter (Filter) and wrapper (ServletRequestWrapper, ServletResponseWrapper) - simple streaming use and the use of decorative mode.

Learning Sevlet, JSP is bound to be deployed to the server, remember the steps to deploy normally file settings and parameters as well as in the procedure how to use it.

Servlet fully understood, the study is relatively easy jsp! Jsp entirely built on the basis of Servlet, which is to cater to those who like to Html scripts embedded in documents (such as: PHP page like programming language) programmer needs only! Learn very easy!

Everything seems so calm, and simple to learn! Behind the appearance of simple complex mechanism. In order for a thorough study of Servlet and Jsp, Tomcat, etc. You have to study the specific realization of open-source software. It is nothing more than a server, a website on the client to the server through the HTTP protocol to send a request, the HTTP server to request the HttpServletRequest into the corresponding object, you call it prepared Servlet, Servlet in your operation you sure this the HttpServletRequest it, at the same time the right to operate the HttpServletResponse, HttpServletResponse this server on the HTTP protocol in accordance with the requirements of the use of HTTP protocol sent to your browser! In the server-side customers in the Jsp page request, Tomcat will use the compiler software, used javax.servlet.jsp template package, compile the jsp files, compiled a Servlet! After the operation and exactly the same Servlet Oh!

In the Servlet and Jsp based on the emergence of the so-called advanced technology: JSTL, Struts ... ... nothing more than a number of labels and the use of MVC pattern.

Move it! Victory on the front! !

7. Multi-threading

A mysterious-looking, very easy to use, it is difficult to master the direction of!

I recommend two books that I feel very good. First of all, my first instinct is to start looking at this book, Sams 1998, published the "Java Thread Programming", written in a good storm, it is easy to read, I also always available to look at the notes! To know how good you look! OReilly second three published "Java Threads", the latest is the 2004 version seems to have the Chinese version of the domestic recommend you look at the English version of it! The book talked about the multi-threaded with the N-related directions, such as IO, Swing, Collection and so on.

You give us some tips! java class libraries associated with the type of multi-threading are not many, mainly: Thread, ThreadGroup and ThreadLocal and InheritableThreadLocal four categories and a Runnable interface; keyword synchronize, volatile; as well as the Object Object wait, notify, notifyAll method!

1 Thread is a type of multi-threaded core, providing a series of creation and operation of multi-threaded approach.

2 ThreadGroup is a management tool for the Thread Class.

InheritableThreadLocal for 3 ThreadLocal and Thread safe provides a similar function of the type of object storage thread!

Needless to say the 4 Runnable it!

5 synchronize synchronization and synchronization is the core of block Oh! Multiple threads call this method, there is only one thread can use this method, other methods of obstruction, were operated in order to ensure the integrity of the object internal state. Synchronize with a thread to call the method or block will be the object when the object lock, completed after the operation block the release of the lock object, which other objects can continue to operate.

6 wait, notify, notifyAll provide an effective waiting / notification mechanism. Java language objects each have a room, any thread in its operation are not satisfied with the status of the object, the object in the rest of the room, lock the release of the object; when the other operation of the thread object, the wake-up thread in the lounge, check their condition, when the conditions are fulfilled, the implementation of the corresponding operation.

Multi-threading more or less on the basis of so many! Simple right! This should be a real programmer is not enough really to be talking about multi-threading, please package java.util.concurrent study it! Master Doug Lea's work, the original is the consistency of an open source programming library, the company was later incorporated into the java class library Sun. Author's web site is also another version of the library! The good thing is worth studying! Hibernation, OpenJMS open source software, such as the use of this package!

8. Design Patterns

Many people talked about the design of multi-mode GOF would recommend that this book is in five-star Amzon recommended books. But not long to learn java, especially beginners java, I do not recommend this book. The main example is the basic book is C + + and many were not clear enough about.

I recommend to everyone this is the first of Dr. YAN Hong "Java and the Model", it is the first book written by the Chinese themselves on the design of books, written more interesting, a lot of integration of culture and concept of the Chinese nation, example, more than class diagrams, and relatively simple! Very good introductory book - it is big Oh!

Second, I recommend the Wiley Publishing House "Pattern In Java" set of three, I only read the first book, it seems less like the second, third good!

The third edition of the Chinese translation of this is multi-threaded mode on the (hard to come by the Chinese translation version) in 2003 China Railway Publishing House published "Java multi-threaded design model", will be multi-threaded model was very simple, with There are a lot of legend, there are exercises for each chapter, and finally have the answer! I have studied the multi-threaded model is that it started!

The fourth, published this year, the Head First series of "Head First Design Pattern", our Head First series of the merits of the book, a large number of types of maps, a wealth of examples, interesting comments, it is worth the purchase!

J2EE followed in the study you can read the direction of Addison Wesley 2002, published the "Patterns of Enterprise Application Architecture", the works of many players, speakers integrated enterprise information! Sun to provide the "J2EE PATTERNS SL500" is also very good! Recommend that the late Amzon 4 and half stars "Holub on patterns", the master's works, provided it is an example worth studying, but the above is not very familiar with the four readers, it is best not to read it! You may compare tired!

After I study was designed to a very tortuous line, before and after reading about 20, Dr. YAN Hong "Java and the Model" I have seen 4 times, but also ruled out the first time I did not understand the basic of the Look! I remember a teacher at the Institute told us that the GOF, as elective courses, Department of Computer Science I and their master's and doctoral together in the end 40-50 in a class of individuals, not more than three individuals to understand, I do not understand any point (based on your poor - mainly my C + + language is not to understand), V I do not lose their character, I think I can also understand the java language, I borrowed the "Java and the Model", the results still did not understand the basic . Very fortunate that Clarity of 3 :00, heard on National Chiao Tung University Machilus Rao if Java OOP language teachers on the lecture, I understand the mode of combination of three books designed model, other models have a strong interest in and to conquer it wish! After work I bought the first book is "Java and the Model", the first pass took 2 months to study the more than 1000 pages of big, then the third time about 15 days you can get, notes a great mind! Then got out of hand.

Selection of books, immersed in research. Believe that will soon be getting started!

Learning Java language part of the eight simple, this is only the Java language, we study the beginning! They understand the, at best, only a java programmer, behind very, very long way! We can continue to study the source code database, Servlet server source code, RMI, EJB, JNDI, aspect-oriented programming, remodeling, ANT tool, Eclipse tools, Spring Tools, JBoss, JOnAS, Apache Geronimo and other J2EE servers! Study of these you may become an excellent J2EE Architecture! You can continue to study the parser, compiler, JNODE (java to write the operating system) ... ...

Thank you for this patient, listen to me Mr Law Chi-kwong verbose when most of the day ! Thank you for reading, thanks to friends in the group! The article in the main group of friends should be the voice - do not know how to choose the book, I do not know where to look! Completed in time for the martial arts most of the day this article, everything on it is inevitable that mistakes out of the ordinary at the same time as a result of the limited capacity of an error! Please read the following criticism!

I have studied the above is the basic language of the order of java, these books are all I have been reading, there is no publicity for any of the ingredients Press! Some methods may not be suitable for you, if you can harvest that two or more, please do not mean you recommend to a friend - to learn!

分类:Java 时间:2009-11-16 人气:1590
blog comments powered by Disqus


  • pure IP database QQwry.dat reading java source code (change) 2010-03-29

    pure IP database QQwry.dat reading java source code, to run this program must go to download QQwry.da, due to too much, I am not here to provide a. 1, / ** * * An IP range of records, including not only national and regional, but also th

  • Statistics java source code lines 2010-05-01

    Statistics java source code lines - eclipse articles Statistics java source code lines - coding articles Statistics java source code lines - plugin articles Statistics java source code lines - software articles

  • JAVA source code of arbitrary structure builder CodeMaster v1.0 Beta 2009-01-27

    Download See attachment struts attached minimum system to run. CodeMaster is an intelligent code generation gadgets, using pure java development, small and simple but in many cases very useful, in theory, any structure can generate java source code,

  • Java source code off-line rules 2010-04-29

    Some enterprises in the recruitment of the time programmers always deliberately put in a request that requires a good numbering plan. Program developers have now really is not alone in going it alone, but to pay attention to body combat. At this poin

  • The use of encryption to protect Java source code 2010-06-07

    Java program's source code could easily be another peep, as long as there is an anti-compiler, anyone can analyze other people's code. This article discusses how to modify the original program without the case, through encryption technology to protec

  • The use of encryption to protect Java source code - is reproduced 2010-06-30

    <script type="text/JavaScript"> </ script> <script src="" type="text/javascript"> </ script> Author: Yuliang Song Source: Yuliang Song ( Software e

  • Java source code search engine 2011-04-19

    Recommend a good java source code search engine, personal feeling good:

  • The Java source code for Android and Eclipse View the latest methods of Association 2011-05-24

    Of: lizongbo Posted: 01:59. Saturday, January 1st, 2011 Copyright : free to reprint, reprint, sure to articles marked hyperlink original source and author information and this copyright notice. In the Go

  • 11 used for optimization. 'S Java source code analysis tools (forward) 2011-08-02

    This article will provide some tools to help you optimize the code and check the source code for potential problems. 1. PMD from PMD scans Java source code, look for potential problems like the following: Possible bug--try

iOS 开发

Android 开发

Python 开发



PHP 开发

Ruby 开发






Javascript 开发

.NET 开发



Copyright (C), All Rights Reserved. 版权所有 闽ICP备15018612号

processed in 0.035 (s). 11 q(s)