From 2000 to date, Java language has been the most widely used programming languages, and has the most extensive development of the crowd. Today, Java is no longer simply a language, it is more like a complete system, a system development platform. Even more, it was extended into a spirit of open source. The book describes in depth the relevant aspects of Java programming, the book covers the basic grammatical structure of Java, object-oriented features of Java, Java collections framework, Java generics, exception handling, Java GUI programming, JDBC database programming, Java annotations, Java's IO stream system, Java multi-threaded programming, Java programming and network communications Java reflection mechanism. Covering a total of java.awt, java.lang, java.io and java.nio, java.sql, java.text, java.util, javax.swing package the vast majority of classes and interfaces. This book is not just from the perspective of knowledge to explain Java, but from the perspective of problem solving to introduce Java language, this book describes the development of a large number of practical case: backgammon games, Stud games, imitation QQ games hall, MySQL Enterprise Management IoC container, a fake EditPlus text editor, multi-threaded, breakpoints download tool, Spring Framework ...... both of these cases each chapter allow readers to consolidate the knowledge, but also allows the reader to apply their knowledge and inspire pride programming, and thus detonated inside programming passion. The book CD contains all the sample code in the book, if readers want to get after-school exercise program code, please log yourself http://www.leegang.org site to download. This book is intended to further grasp all readers to write Java programming, suitable for all levels of learners and workers to read Java, also suitable as a university education, training institutions Java textbook. But if you just want to simply dabble Java, the book is too large, not suitable for reading.
Translated by Google
About the Author
Gang engaged in eight years of Java EE application development. Former LITEON J2EE technology company, is responsible for the company's enterprise architecture information platform. Former Telecom Guangzhou, Guangdong Longquan technology companies such as technical training instructor. March 26, 2007 the "computer" Interview figure. Guangzhou New Oriental incumbent IT training software teaching center director, who served as a part-time associate professor of Guangdong Polytechnic Normal University Department of Computer Science. Students are trained in the inaugural Huawei, Ericsson, Faith, Netease, PCCW, CE Dongli other companies. Well-known high-end IT technical writer, has published "Spring2.0 Collection", "J2EE-based Ajax Collection," "lightweight J2EE enterprise applications combat", "Struts 2 Definitive Guide", "Ruby On Rails agile development best Practice "and other works.
Translated by Google
Slogan
Best-selling book "Struts 2 Definitive Guide" Gang of another masterpiece, Java training experience from the author of three years, _set_ting the author of nearly 3000 hours of teaching experience, summed up the hundreds of students in the learning process Java typical errors. 1. Stories driver detonated programming passion Java book involves a lot of cases, is committed to the development of practical knowledge integration projects, I hope readers find these programs by writing programming fun. 2. Gang teacher classroom atmosphere reproduction The author of this book is a summary of teaching experience, the knowledge system is taken from Crazy Gang Java combat curriculum. Strive to replace the boring plain metaphor to explain to madness combat instead of empty theory. 3. Notes detailed, easy to use Code is very detailed notes in the book, there are two lines of code in almost every line of notes, even brought some simple theory as comments interspersed into the code, which greatly reduces the difficulty of the reader.
Translated by Google
Foreword
The Java language has won an unprecedented success: from 2001 to 2007, Java language has been the world's most widely used programming language, so there are now a growing number of workers, learners are trying to enter the Java field or will be efforts to enter Java fields. In order to help the majority of workers, learners can really master the Java programming language to feel the charm of Java, the Java programming comprehend the joy, the author based on Java nearly three years of teaching experience, well-written book. Before I started writing this book has touched so many recently graduated college, they told the author: Chose programming, just looking for a job. I asked them, do not like programming? They answered: What is programming fun? Not is to write 1 + 2 + 3 + ... + 100 =? ...... Such a program. So I know: They misunderstand the program. So I told them: If I come on the C language, you can write at least talked about a simple game plug-in, if a little deeper, you can combine the operating system theory, the preparation of an operating system prototype - which is meant to write programs. The role of the program are: to solve the problem - if your program can not solve your own problems, how to expect your program to solve other people's problems? That's what the value of your program? So I think: The best way to learn is to "case-driven" - Why use this knowledge to know before going to learn this knowledge, rather than blindly learn! So book emphasizes practical programming, emphasizing programming projects to stimulate interest. In the author's teaching process, almost all the students have had to learn a good night's experience, nobody forced, asking them, just because they can not resist the temptation of programming - which is also the author later founded Java Training Camp Crazy direct combat reason. In fact, each of which can be programmed in the field of small have income people have had the experience of the night, it would be difficult to become a good programmer. One might think that the night is too hard - but to play bitter sweat under the hot sun is not bitter? Sleepless nights playing the game not bitter bitter man? They naturally fun! Similarly, for programmers crazy all night long, programming, debugging is not bitter, but a pleasure. If the reader experience this realm as early as one day, it will one day open minded programming. I do not want to tell you: After reading this book you will become a master! In the field of programming, there is no so-called "martial arts secrets", no matter how good the book must meet a lot of practice, otherwise the book still belongs to the author's knowledge, the reader is as if the body into the Han Baoshan and nothing stupid. So book with a lot of high-intensity exercise, I hope the reader force myself to complete these projects. These exercises answers can log http://www.crazyit.org site to download. Author of the book will continue to maintain the existing style: simple. There is a letter from a reader so I remember very deep, he told reporters: Relative Some people like the "esoteric" Compared books he prefers "simple" IT books, "simple" thing is clear, the next step how do, why do everything clearly, without any speculation, imagination - exactly in line with the computer philosophical: 0 is 0 is 1, the middle is no room for maneuver. His letter is consistent with the author's point of view: IT books should be simple, easy to understand, after completing their studies can bring increased efficiency to produce books. This book is the case, when reading this book the reader will feel very simple, but after reading the program can be developed and very practical.
Translated by Google
Creative ideas
Charity - Also on my creative ideas Charity, Water benefits all things without struggle, all of the evil, and so few on the road - "I" In the vast vast Chinese classics, I like this sentence alone, it seems a motto, revealing the most modest life, but the most esoteric reincarnation. Between the vast world, only water so colorful gesture: in the day, as the cloud Wen, gorgeous gorgeous; in the valley, for the River is deep, turbulent expanse; the ground, for the hills of the mountains, crystal clear. Often want to help, what kind of life in order to achieve the "Flow"? After many years of software development experience, I temporarily left the line to develop jobs, started a new training center in East Java lecturer IT career also began to do some technical advice, staff training, etc., became a preacher of software development. In later days, I think this is a cycle: one from the cycle of learning to learn. The difference is: Years ago, I learned; now, learning my students, my clients. Because of this cycle, there is the opportunity to revisit my misery year: thousands of hearts full of passion for learning, but one after another over the issue head-bashing, whether that passion will be lasting? Now the students told me: learning is a very happy thing, especially after solving the problem really happy! But if a problem tossing two days are not the right answer, it is very unhappy! From their words, I realized the truth: What is happiness? I think that happiness is the feeling of satisfaction after a lot of hard work to reach the destination after. Happy with the following equation: + Happy = hardships to reach the destination. The whole process only if the hardships, there is no purpose to arrive, then all the hardships on zero. As God punish West Dover thread push the stone, repeated pushing a rock up the hill every day the same, it becomes a punishment! Responding to this, I created the book in the hope that learners can bring happiness, if they are experiencing a software development _set_backs hundred thousand turn back, they can find solutions to problems from books. Therefore, the creation of a series of books that I have only one purpose: to solve problems, to solve practical problems. The whole creative process, adhere to tackle development issues for the purpose of knowledge inherent logic of the main line, as in plain straightforward way, hoping to bring the reader happy. The creative process, I do not want to use those too specialized concept, but introduce the usage of each knowledge point and the corresponding grammatical knowledge, and a variety of professional concepts, I'd rather put Finally! Have to admit, the concept of professional computer field is so endless, and so I lied! Such as network programming Socket, I do not know who the "genius" will be translated into the "socket", which years ago was my nightmare; Another example is the popular AOP programming Advice, some say is recommended Some said that the notification is completely incomprehensible! This name, which is what beginners torture ah! Often think: the names of these concepts is very important? Why do I have to give them such an "esoteric" name? For example to explain the method of rewriting, I summarize the method of rewriting rules: two with two small and one large, are the parent class, subclass same method name, parameter list the same sub-class method returns a value of the same type or smaller, subclass method throws an exception or less the same, the method of controlling access subclass equal or greater. When my students to interview, the interviewer introduced to his rule, his interviewer repeatedly asked him: What is abnormal is smaller? Only parent-child relationship between abnormal, no size relationship! (In fact, from the parent class to subclass general to the special relationship is therefore possible that the scope of the subclass is smaller than the range of the parent class, as the scope of the class is smaller than Apple's range of fruit) This is a Species Status: Most people interested in those very formal, but banal to say, very few people are willing to "Cinderella decadent." Insists that: Cinderella decay may require more in-depth knowledge, a higher perspective in order to reach this level. Regardless of how the evolution of human knowledge, how complex kinds of knowledge are associated with profound analogy, even some very obscure knowledge, and so truly understand the meaning of it, will find that it is similar to everyday life The most common thing. For example describes the design pattern books, most spoke very professional, even a little surprising facility. But I prefer this design patterns: When you see a ditch lie in front of you, you should jump in the past, rather than continue to go before! This is the design pattern. But if a beginner on a so-called "expert" describes this definition, we must again be questioned repeatedly. Authoring a book, the purpose is very important! Because my goal is to solve problems, to bring happiness readers. So I want to use the example of the most common and most esoteric knowledge analogy, to let the reader from the most common knowledge, the transition to the so-called expertise. Help readers find analogies between the obscure knowledge and everyday knowledge, so that readers have a "so-called knowledge, but the original is so" feeling! Many so-called "master", and accumulated a certain amount of knowledge, but far from the "Enlightenment" of the state, most of the time only others, but often think they grasp the truth is the most correct! This is academics eternal sorrow, sorrow as Bruno was burned at Rome as the flowers square! The development of the domestic industry more impetuous, my teacher interviews are a big company technology managers, project managers, and even the structure of a large IT training teachers quit, but asking them to write a simple network communication program, they often many reasons: there is no documentation, no IDE tool, not the Internet to find information, inadequate preparation ...... Their reason than their knowledge! Perhaps this is the status of the majority of Chinese programmers: They are the "master", frequently proficient "Java, C + +", but once asked on the spot to complete a small program is difficult! In fact, many students learn with me after a month, you can complete a mock application QQ online game lobby, then later, you can develop a MySQL Enterprise Manager (same function and MySQL Front). But I always tell them: Do you still poor, still need more accumulation! Change this floating din! Another object of the book is my creation. The whole creative process, has always insisted "code is the last word" criteria, adhere to all the knowledge points the way out of a small demo application. Because: The program is written, rather than speak out. Readers can from what I have created a series of books, each can see the wealth of code examples. Authoring a book is a very hard thing, and even some more harm than good. Someone once told me that if you want to make money by writing a book, you should write "How the Internet," "How to use the Windows" like the theme, because wide audience! But he did not understand: I never thought to make money through the creation of books. I, as the new director of the Guangzhou East IT training and teaching center, newly recruited teachers can be brought nearly 10,000 salary. So I never thought to make money through the creation of books. Next plan includes the creation of WorkFlow and Shark, more narrow audience! But I will still write, but will be very careful to write! As I wrote the book describes Struts2, I want to first introduce Stuts2 this book is written in Chinese! Similarly, in the years of enterprise application development, I think WorkFlow usefulness is so large, it is necessary for the country's software developers understand it, use it, so I want to introduce it. China also has a very strange contrast: There are a lot of "angry youth", they are patriotic, they have some arrogant self-confidence, they fear, saliva on the web every day to conquer the world on the network. In contrast, many people in the field of software development is very low self-esteem, they think certain foreign software talent better than domestic, foreign books certainly better than domestic! When I published "J2EE-based Ajax Collection" available, the comment was made on the web: written in such a comprehensive, certainly from where plagiarism! Sometimes we remember Ning foreign person, but do not want to remember our own words. For example, a well-known software development DRY rule, in fact, many years ago, I said: If you repeat the same code twice or more in a system design of the system could be improved. Admittedly, foreign IT technology than the overall level of domestic IT technology to be high, but not all foreign software developers on better than all domestic software developers! In the context of floating clamor, there were still a number of people buried indulge source software, they are quietly supporting China's software industry, they are the real programmers. And I, as a programmer who indulge code, in the hope that this pragmatic spirit spread out, with my books, with the code book, put this pragmatic spirit spread. Personally think that this is a patriotic and patriotic way I like: practical patriotism! Charity, Water benefits all things! I do not know whether the benefit of all things good, but I was hoping that they can benefit all, I hope to be able to book the creation of China's software industry to make a modest contribution. If my book is a true programmer to solve the problem and bring happiness programmer, it is my greatest joy.
Translated by Google
目录
8.3.2 _set_ the upper limit of 300 types of wildcards