Joke Collection Website - Cold jokes - Different learning stages of java
Different learning stages of java
1.Java language foundation
When it comes to books on basic learning of Java language, you will definitely recommend Bruce Erker's Thinking in Java, which is a very profound technical book, and basically no other books can surpass the basic part of Java language. Bruce Erker, the author of this book, is a famous genius speculator on the Internet. Thinking in C++ won the Jolt Award for Best Book in Software Development in 1995, and Thinking in Java was rated as "Readers' Favorite Book" in the Java world by 1999, and won the Editor's First Choice Book Award. Since 1986, the author has published 150 articles on computer technology, 6 books (4 of which are about C++) and made hundreds of speeches all over the world. He is thinking in Java, thinking in C++, and in c++&; Author of "Using C++, Thinking with Patterns", editor of Black Belt C++. His book is called "the best Java reference book … absolutely shocking" by readers; The wisest choice to buy Java reference books; The best programming guide I have ever seen. The author's extraordinary talent and cross-language ability make him one of the 10 people who have the closest relationship with Java in the 10 years of Java development.
Thinking in Java tells all aspects of the Java language, and many veterans of the Java language have commented that "this is a book that makes the Java language quite ugly". The book talks about many details of the java language, and every aspect is quite profound. You can see the ugliness of the java language through this book.
There are many videos about java language on the Internet, some of which are out of line and rubbish. Weng Kai -java Language may be the only choice for you to learn the basics of java language. The lecture is basically based on the book "Thinking in Java", which contains many interesting jokes by Mr. Weng. I am lucky that my study started with this video. The content includes 30 lectures, and I watched it three times in total.
However, for beginners, I don't recommend thinking in Java. I recommend the Core Java 2 of Prentice Hall PTR, which is called Java 2 core technology in China, and is currently in the seventh edition. You can download the electronic version online. O 'Reilly's Java in the Shell is also a good choice. After reading the above two books, you can watch Weng Kai's video, and then you can learn Java thinking.
2.Java data structure
There are few books about Java data structures on the market. There is roughly a Java collection of APress. Data Structure in Java by Jones and Bartlett, Object-oriented Data Structure Using Java and Data Structure and Algorithm in Java published by Prentice Hall (DEC 19, 2005), and there is also a book called Data Structure and Algorithm of Object-oriented Design Pattern in Java. Fortunately, my first English book was APress's Java Collections (this book may not have a Chinese version at all in China-it can only be downloaded in English). It is very good, and it is very standardized and simple. This is a complete introduction to the Java Collections API, and there are some extraordinary examples of extending the API. This is the only good book that I recommend you to learn java data structure. Two other books by Jones and bartlett seem to have Chinese versions in China. You can have a look if you want.
After learning the API, you can look at the corresponding classes in the java.util package. However, only by learning the design pattern can we fully understand the whole Java Collections framework. The Java Collections framework uses many famous design patterns, such as iterator pattern, factory method pattern, decorator pattern, adapter pattern and so on. By studying the source code of the data structure in the java.util package, we can know that the design of the notorious Properties class may basically have the ability to design simple data structures.
There is no end to learning. After learning the Java Collections framework provided by Sun, you can learn another Java Collections framework of Apche, which is very interesting. Two complementary frames.
Before you study and study Java collection, I want to remind you that Java collection mainly includes the following three parts: interface, implementation and algorithm.
The 1. interface mainly includes list, collection, queue and mapping. Lists, collections and queues are subinterfaces of the collection interface.
2. The implementation is mainly to realize the concrete classes of these interfaces. For example, ArrayList, LinkedList, Stack, and Vector that implement the List interface implement hashSet, TreeSet, and linked hashset of the collection interface; Implement priority queue, synchronous queue, etc. Of the queue interface; HashMap, TreeMap, Hashtable, Properties, WeakHashMap and so on that realize the map interface.
3. This algorithm is mainly provided by array classes and collection classes, and it is the core of the whole Java collection framework algorithm. Support various common operations such as sorting and searching.
Java Collections contains two versions of data structures, mainly the original data structure that supports synchronization and the data structure that does not support synchronization later.
The Java collection framework supports sorting by using comparators and similar interfaces. At the same time, two versions of Iterator and Enumeraton are provided, and how to convert them.
The Observer interface and the observer class in the java.util package are the core of the observer pattern.
……
3.Java IO
There are only two books on Io published by O 'Reilly Press, both of which are works by Elliot Rasty Harold. The styles of the two books are basically the same. It is recommended to read the first edition of jva I/O, which is relatively simple, concentrated and has many examples. The second edition was published abroad in May this year. Fortunately, I downloaded the second edition online, and it was extremely detailed-726 pages of big shots (it took me two weeks). This time, NIO and IO are combined, including J2ME, but the serial port and parallel port communication parts seem to be not supported by the class library, so I can't actually operate them.
Along with the first version of jva I/O, Oreilly also has a copy of Jvava NIO, which is also very good.
After reading java.io and jvananio in turn, you can study the source code in the java.io package. Before you study the source code, I'll give you a hint:
Io package of Java mainly includes:
1. There are two streams: byte stream and character stream. There is no question of who replaces who and who is superior to whom. The two complement each other, but each has its own emphasis.
2. Two symmetries: 1. Symmetry of byte stream and character stream; 2. Symmetry of input and output.
3. Bridge: InputStreamReader and OutputStreamWriter that convert byte streams into character streams.
Among them, it must be pointed out that:
1.PipedInputStream and PipedOutputStrem are two interesting classes.
2. Buffer stream is a class that we often use.
3. The most famous application of decorator pattern in java is the design of io. Carefully study the relationship between each filtering process and the specific process, and read more books on design patterns. I believe you will gain something.
4. Learning io package well is the basis of learning net package and rmi package.
4.Java database
There are too many books in the database, and they are terrible! I have basically studied all the books in this field, and I recommend you to read Apress's JDBC Solution to Problems, which is very good. It was published only at the end of 2005 abroad (it seems that there is no Chinese version in China, but it is not necessarily worth reading when it is published-domestic books are often translated at sixes and sevens, which is not good-looking), but we are really lucky to have an electronic version online. It is worth seeing. The first satisfactory book recommended to me, the Java database Bible published by Wiley, is very good! Sun's own API tutorial andRefernece is also good. My second JDBC book is the API I studied.
But at present, these books are relatively superficial API application books. I will bring you a book introducing the internal details of JDBC API and JDBC implementation when I have the opportunity! I will try my best as soon as possible and hope to get your support!
By the way, I want to give some advice to my friends who study JDBC:
The learning and use of JDBC is mainly this API, and the use process is extremely simple. The following is the general process of using JDBC:
1. Loads the driver (driver class) of a database, usually using Class.forName ("driver's class name");
2. Connect to the database-
Connectioncon = drivermanager. getconnection (URL, username, password);
3. Get conversation-statement stmt = con.createstatement ();
4. Execute the operation-result RS = stmt. ExecuteQuery ("SQL query statement ");
5. Processing results-
while(rs.next()){
string col 1 = RS . getstring( 1);
……
}
Simple! The whole JDBC can change roughly as follows:
1. Connecting objects can create three types of Statements: statement, PreparedStatement and CallableStatement.
2. You can create many types of ResultSet: support one-way movement and free movement; Renewable and non-renewable; Support different levels of transactions … ..
3. Batch processing of data input.
4. Operation of special types (Blob, Clob, Arrary and Ref, Struct) columns in the result set.
5. These special types of input databases.
6. Operation of special result sets (CachedRowSet, JdbcRowSet, WebRowSet) in 6.javax.sql package.
7. the other is DataSource, which is also very simple! Managed objects in J2EE
Simple! I believe everyone will conquer JDBC soon.
5.Java network programming
Network programming ―― a mysterious and challenging direction. But before I talk about java network programming, I want to thank the developers of Sun Company, because their ingenious ideas and intelligent architecture make it extremely easy for java programmers to learn Java network programming.
For the book on Java network programming, I recommend O'Reilly's Java Network Programming, which is now in its third edition. The previous version must be available on the market! There is an electronic version of the third edition on the Internet, published abroad in 2004, with 706 pages! It's comprehensive, deep, too deep. Some things about Sun are difficult to talk about because they are not fully explained. Interested parties can download it! The second book is the basic part of Java distributed computing published by O'Reilly 1998. It is written in detail, and the following examples are still worth studying.
Before you read these books, I'll give you a hint:
Java network programming is actually relatively simple and quick to get started. Java network programming mainly includes two parts:1.socket; 2.URL part. However, the second part is completely based on the first part.
1. Sockets include client sockets and server sockets. There are DatagramPacket and DataGramPacket, which correspond to UDP communication protocol. In a word, the Socket part is the basis of establishing other high-level protocols.
2.URL class is a network resource locator, which is usually related to specific network protocols such as HTTP, FTP and telnet. Through this class, you can connect the resources on the network, and through its openStream, you can read the network resources in the form of InputStream in the io package. Through its OpenConnection method, you can open a connection, on which you can not only complete the reading operation, but also complete the writing operation.
Java network programming generally includes the above two parts. Network programming is closely related to IO and multithreading, so you must have a thorough understanding of these two parts before learning this part.
After learning the above parts, you can learn the relevant source code in java.net package! It is still too early to study all the source code. The whole net package contains such auxiliary classes as ContentHandlerFactory, URLStreamHandlerFactory, URLStreamHandler, URLClassLoader, etc., which constitutes the framework of java.net network programming. By studying its source code, we can not only quickly understand the java.net package, but also lay the foundation for expanding the package in the future, and even apply this way of thinking to our own projects.
Up to now, you should only know about 60% of java.net packages. Some of you can open rt.jar in the \jdkxxx\jre\lib directory under your JDK installation directory with JDecompiler software and decompile all files with WinRAR software. This is the details of URL class work. After learning sun.net software package, you will be familiar with the whole network programming.
It seems that we have mastered network programming. Actually, this is just the beginning. If you want to go deeper, please continue! Many excellent network programming libraries and even software on the network can "add skills" for us. For example, Apache's HttpCore and HTTPConnection are two libraries related to HTTP protocol; JGroups is a must-read library for learning distributed communication and group communication. Then we can study P2P software packages, such as JXTA of Sun Company, which may be the standard of peer-to-peer communication on java platform in the future. Then you can study the extremely mature and widely used P2P software Azureus! Www.sourceforge.net can download it!
A journey of a thousand miles begins with a single step! Do it! At present, only the network package has been studied, and others will continue to deepen in the near future. For some reason, Sun Company did not disclose other details of net implementation. When it allows its source code to be studied in the form of words and its unpublished implementation to be written into the book, I very much hope to publish a book about java network programming for readers! ! )
6.Servlets and JSP
Servlet and JSP books are everywhere! Only two or three books are worth recommending. In fact, Addison Wiley's Servlets and Java server Pages:J2EE technology Web layer is another very thick book! Published abroad in 2003, with 784 pages, the content is comprehensive and there are many examples, especially in Chapter 8, Filter, which gives several good examples. All the other books I have read about Servlet and JSPs are not so in-depth! Maybe I didn't see it. O'reilly's Java Servlet programming and Java server pages are relatively easy to understand and can be read!
Before you learn Servlet and Jsp, I still want to remind you:
Essentially, Servlet is a server-side program, which implements the Servlet interface and deploys it on the server side! It can be written like any other java application. It can operate databases, local files and connect local EJB…… ............. The general process of writing Servlet programs is as follows:
1. inherits the HttpServlet class;
2. Cover its doGet and doPost methods;
3. Operate the method parameters HttpServletRequest and HttpServletResponse in the override method.
4. The read request utilizes HttpServletRequest. Using HttpServletRequest, you can operate the protocol header of Http protocol, get the operation method of the request, get the path of the request, get the string of the request, and get the relevant information of the requesting client. More importantly, you can get Cookie and HttpSession.
5. Using Cookie, you can manipulate the "sweetheart" object or write it to HttpServletResponse.
6. You can use HttpServletResponse to output information to customers. With HttpServletResponse, you can write various types of protocol headers, add Cookie, redirect other URLs, and send the status code of Http protocol to customers.
7. Use HttpSession to complete any function you want in the session.
At the same time, Servlet also provides some events and event listeners (simple observer mode). There are also Filter and servletrequestwrapper-the use of simple streams and the use of decorator patterns.
Learning Sevlet and JSP must be deployed to the server, just remember the common steps and parameter settings of file deployment and how to use them in the program.
After fully understanding Servlet, learning jsp is relatively easy! Jsp is completely based on Servlet, which caters to the needs of programmers who like to embed scripts (such as PHP and other web programming languages) in Html documents! Also pretty studious!
Everything seems so calm and easy to learn! There are complex mechanisms behind simple appearances. If you want to study Servlet and Jsp thoroughly, you have to study the concrete implementation of open source software such as Tomcat. It's just a server. After the client sends a request to the server through the HTTP protocol using a webpage, the server converts the HTTP request into a corresponding HttpServletRequest object and calls the Servlet you wrote. You must have operated this HttpServletRequest in the servlet. At the same time, you have operated the HttpServletResponse, and the server will send this HttpServletResponse to your browser according to the requirements of the HTTP protocol! After the server-side jsp page is requested by the customer, Tomcat will compile this Jsp file by using the template in the javax.Servlet.jsp package, and it will be a servlet after compilation! The future operation is exactly the same as Servlet!
Based on Servlet and Jsp, the so-called advanced technologies: JSTL and Struts…… are nothing more than the use of some tags and MVC patterns.
Let's move on! Victory is ahead! !
7. Multi-thread operation
A direction that looks mysterious but is easy to learn and difficult to master!
Recommend two books that I think are good. First of all, I started reading books on this subject by instinct. Java Thread Programming published by Sams 1998 is extremely well written and easy to read. Read your notes often when you have time! You know what to do. See for yourself! The second book, Java Threads, was published three times by OReilly and was the latest edition in 2004. There seems to be a Chinese version in China. I recommend you to read the English version! The book talks about n directions related to multithreading, such as IO, Swing, Collection and so on.
Give everyone a hint! There are not many classes related to multithreading in java class library, mainly including: thread, ThreadGroup, ThreadLocal, InheritableThreadLocal and a Runnable interface; Synchronization; Variable; And the wait, notify and notifyAll methods of the object!
1 Thread is the core class of multithreading, which provides a series of methods to create and operate multithreading.
2 ThreadGroup is a tool class for managing threads.
3 ThreadLocal and InheritableThreadLocal provide a class for Thread to store thread objects similar to safe functions!
4 Runnable needless to say!
5 synchronize is the core of synchronization method and synchronization block! When multiple threads call this method, only one thread can use this method, and other methods are blocked, thus ensuring the internal state integrity of the manipulated object. When a thread calls a method or block with synchronize, it will get the object lock of the object and release the object lock after completing the operation in the block, so that other objects can continue to operate.
6 wait, notify and notify all provide effective waiting/notification mechanisms. In the Java language, every object has a lounge. If the state of the object it operates is not satisfactory, any thread will rest in the object's lounge and release the object lock. When other threads operate the object, wake up the threads in the lounge and they will check the conditions again. When the conditions are met, they will perform corresponding actions.
Multithreading is very basic! Simple! This should not be enough for a real programmer. If you really want to master multithreading, please study the java.util.concurrent package! The work of Doug Lea was originally an open source consistent programming library, and was later incorporated into the java class library by Sun Company. There is another version of this class library on the author's website! Good things worth studying! Hibernation, OpenJMS and other open source software all use this package!
8. Design mode
When it comes to design patterns, many people will recommend GOF's book, which is a five-star recommendation book on Amzon. However, for those who have not studied java for a long time, especially beginners, I don't recommend this book. Mainly because the examples in this book are basically C++, and many details are not clear enough.
The first book I recommend to you is "Java and Patterns" by Dr. Hong Yan, which is the first book about design patterns written by China people themselves. It's interesting, and it blends many China cultures and concepts. There are many examples and class diagrams, and they are relatively simple! Very good primer ―― big guy again!
Secondly, I recommend a set of three "Patterns in Java" published by Wiley Press. I just watched the first one, the second one doesn't seem so good, and the third one is not bad!
The third book is about the Chinese translation of multithreading mode (a rare Chinese translation). The Java multithreading design mode published by China Railway Publishing House in 2003 makes the multithreading mode very simple, with a large number of legends, exercises in each chapter, and finally an answer! It is the beginning of my research on multithreading mode!
The fourth book, Head First Design Pattern, published this year, inherits the advantages of Head First books, with a large number of class diagrams, rich examples and interesting annotations, which is worth buying!
Secondly, in the direction of J2EE, you can learn to read Patterns of Enterprise Application Architecture published by Addison Wesley 2002, which is a lot of famous works, focusing on enterprise message integration! The pattern SL500 provided by Sun is also very good! It is too late to recommend the works of AMZON's 4.5-star master Holub on patterns, which provides an example worthy of study, but readers who are not very familiar with the above four books had better not read them! It may make you very tired!
I learned the design pattern through a tortuous route. I have read about 20 books back and forth, and I have read Dr. Hong Yan's "Java and Patterns" four times, but I still ruled out all the things that I didn't understand the first time! I remember the teacher told us about GOF's books during the research. As an elective course, I have 40-50 students in a class, and no more than 3 people know it and know nothing (poor foundation-mainly knowing nothing about C++ language). With my indomitable character, I think my understanding of java language is ok, so I borrowed Fortunately, I listened to a lecture on Java OOP given by Rao Ruonan, a teacher from Shanghai Jiaotong University. After I learned about three design patterns, such as the combination book pattern, I became interested in other patterns and had the desire to conquer them! The first book I bought after work was Java and Patterns. It took two months to study this big guy with more than 1000 pages for the first time, and it will take about 15 days to read it for the third time. I wrote a lot! Since then, it has been out of control.
Choose the right book and immerse yourself in the research. I believe I will get started soon!
Learning 8 simple parts of Java language is only the beginning of our research on Java language! I know all this. I'm just a java programmer at best, and I have a long way to go! You can continue to study the source code of database implementation, Servlet server, RMI, EJB, JNDI, aspect-oriented programming, refactoring, ANT tools, Eclipse tools, Spring tools, JBoss, JOnAS, Apache Geronimo and other J2EE servers! After learning these, you may become an excellent J2EE architecture! You can continue to learn parsers, compilers, and JNode (an operating system written in Java) ...
Thank you for your patience and listening to me for so long! Thanks for reading, thanks to the friends in the group! This article mainly responds to the voices of friends in the group-I don't know how to choose books and where to find them! It takes a long time to finish this article, so it is inevitable that there will be mistakes in words, and at the same time there will be mistakes because of limited ability! Please criticize and correct me after reading it!
The above is basically the order in which I learned the java language. I have read all the above books, and there is no publicity from any publishing house! Some methods may not suit you. If you can gain a little, two or more, please don't be stingy to recommend it to your friends-study together!
- Previous article:18 Funny copy of WeChat Super Fire
- Next article:How does famine unlock the whole character?
- Related articles
- Ghost hunting movie
- How should I greet my local neighbors and communicate with them in Cantonese?
- You too. Which joke?
- My sister looked down on me and was strongly countered by me. Why are you wrong when people say I'm not serious and others attack you?
- Please recommend some good novels to me, such as online.
- The most unforgettable sentence-this time, I am very disappointed when I think about it.
- There is a funny post about the benefits of raising children, saying that it can be used as a pillow and so on. Can you help me find it?
- Asymptomatic is Pleasant Goat and high fever is Boiling Goat.
- Traditional Chinese medicine is profound, but why is the average life expectancy of the ancients not high?
- How to write an essay asking people to buy more books