On Java 8 java编程思想 pdf下载

所需积分/C币:40 2019-05-10 22:26:16 8.46MB PDF

https://download.csdn.net/download/lingcoder/10777719; 只能说比如上的版本排版好一些。 但是依旧好的有限。非正式版的 true pdf; On Java 8 - Bruce Eckel.pdf。
I#title_page. xhtml (style="display: none, "1 [I#title_page. xhtmlGBS.0002.011 [style="display: none; I[t#title_page. xhtml#GBS.0002. 02 L#ch001xhtml :style="display: none; I L#ch001.htmlGBS0003.011 [#chool. xhtml#on-java-8 section, levell. unnumbered On Java 8 Copyright @2017 by Bruce EckeL, President, MindView LLC. Version: 7 工SBN978-8-9818725-2-8 Thisbookisavailableforpurchaseatwww.onjava8.com,whereyoullalsofindsupportingmaterials All rights reserved. Produced in the United States of America. This publication is protected by copyright, and permission must be obtained from the publisher prior to any prohibited reproduction,[If#ch001 xhtml#GBS0003.02) storage in a retrieval system, or transmission in any form or by any means, electronic, mechanical, photocopying, recording, or likewise Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks Where those designations appear in this book, and the publisher was aware of a trademark claim, the designations have been printed with initiall#ch001 xhtml#GBS0003.03) capital letters or in all capitals Java is a trademark of oracle, inc. Windows 95. windows nt windows 2000, Windows xp Windows windows 8 and Windows 10 are trademarks of Microsoft Corporation. All other product names and company names mentioned herein are the property of their respective owners The author and publisher have taken care in the preparation of this book, but make no expressed [chaol.xhtml#GBS0003.04] or implied warranty of any kind and assume no responsibility for errors or omissions.No liability is assumed for incidental or consequential damages in connection with or arising out of the use of the information or programs contained herein. This book was created as an e Book for tablets and computers. That is, it was not first created for print and then converted. It is an e Book first---all layout[(#ch001xhtml# GBS0003.05] and formatting is designed to optimize your viewing experience on the various e Book reading platforms and systems CoverdesignbyDanielWill-harris,www.will-harris.Com Istyle="display: none; l(#ch001 xhtml#GBS0003.06) 0#ch002xhtml style="display: none; "[Cch002 *html#GBS0004. 01] I# ch002 xhtml#preface section levell) Preface This book teaches the most modern form of Java programming using the features in the 8th version of that anguage. My previous Java book, Thinking in Java, 4th Edition (Prentice Hall 2006), is still useful for programming in Java 5, the version of the language used for Android programming. But especially with the advent of Java 8, the language has changed significantly enough that[#chao2. xhtml#GBS0004.02) new Java code feels and reads differently. This justified the two-year effort of creating a new book On Java 8 is designed for someone with a basic foundation in programming For beginners, web sites like Code. org and Khan Academy can provide at least some of that background, along with the Thinking in c seminar freely available at the OnJava8 Site Services like YouTube, blogs and StackOverflow[l(#ch002 xhtml#GBS0004.03 have made finding answers ridiculously easy compared to just a few years ago when we relied on print media. Combine these with perseverance, and you can use this book as your first programming text It's also intended for professional programmers who want to expand their knowledge I am grateful for all the benefits from Thin king in Java, mostly in the form of speaking engagements all over thell (# ch002 xhtml#GBS0004.04) world. It has proved invaluable in creating connections with people and companies for my Reinventing Business project. One of the reasons I finally wrote this book is to support my Reinventing Business research, and it seems the next logical step is to actually create a so-called Teal Organization. I hope this book can become a kind of crowdfunding for that project . ch002. html# goals, section. leve[2 Goals Each chapter teaches#ch002. html#GBS0004.05) a concept, or a group of associated concepts, without relying on features that havent yet been introduced. That way you can digest each piece in the context of your current knowledge before moving on. My goals in this book are to 1. Present the material one step at a time so you can easily incorporate each idea before moving on, and to carefully sequence the presentation of features so you'relIf#ch002 xhtml#GBS0005.01 exposed to a topic before you see it in use. This isn't always possible; in those situations, a brief introductory description is given 2. Use examples that are as simple and short as possible. This sometimes prevents me from tackling"real world problems, but I've found that beginners are usually happier when they can understand every detail of an example rather than being impressed by the scope#ch002 xhtml#GBS0005.02] of the problem it solves. For this I might receive criticism for using"toy examples, but I'm willing to accept that in favor of producing something pedagogically useful 3. Give you what I think is important for you to understand about the language, rather than everything I know. I believe there is an information importance hierarchy, and there are some facts that 95 percent of programmers willl #ch002 xhtml# GBS0005.03] never need to know---details that just confuse people and increase their perception of the complexity of the language. If you must think about it, it will also confuse the reader/maintainer of that code, so l advocate choosing a simpler approach. 4. Provide you with a solid foundation so you understand the issues well enough to move on to more difficult coursework and books [#ch002 xhtml#language-design-errors section leve 2) Language Design Errors ∷ style=" display:none;"}山{#ch02. xhtml#GBS.005.04}∷ Every language has design errors. New programmers experience deep uncertainty and frustration when they must wade through features and guess at what they should use and what they shouldnt It's embarrassing to admit mistakes, but this bad beginner experience is a lot worse than the discomfort of acknowledging you were wrong about something Alas, every failed language/library design experiment[#ch002 xhtml#GBS0005.05] is forever embedded in the Java distribution The Nobel laureate economist Joseph Stiglitz has a philosophy of life that applies here, called The Theory of Escalatin Commitment The cost of continuing mistakes is borne by others, while the cost of admitting mistakes is borne by yourself. If you've read my past writings, you'll know that when I find design errors in a language, I tend to[ I#ch002 xhtml#GBS0006.01) point them out. Java has developed a particularly avid following, folks who treat the language more like a country of origin and less like a programming tool. Because I've written about Java, they assume am a fellow patriot. When I criticize the errors I find, it tends to have two effects 1. Initially, a lot of"my-country-right-or-wrong" furor, which typically dies down to isolated pockets. [I t#ch002xhtml#GBS0006.02] Eventually---this can take years---the error is acknowledged and seen as just part of the ory 2. More importantly, new programmers don't go through the struggle of wondering why"they"did it this way, especially the self-doubt that comes from finding something that just doesn't seem right and naturally assuming must be doing it wrong or/just dont get it. Worse, those who teach thell#ch002xhtml#GBS0006.03] language often go right along with the misconceptions rather than delving in and analyzing the issue. By understanding the anguage design errors, new programmers can understand that something was a mistake, and move ahead Understanding language and library design errors is essential because of the impact they have on programmer productivity. Some companies and teams choose to avoid certain[If#cho02 xhtml#GBS0006.04 features because, while seductive on the surface, those features can block your progress when you least expect it. Design errors also inform the creation and adoption of new languages. It's fun to explore what can be done with a language, but design errors tell you what can't be done with that language For many years, I honestly felt a lack of care from the Java designers regarding their users. [I#ch002 xhtml#GBS0006.05 Some of these errors seemed so blatant, so poorly thought-out, that it appeared the designers had some other motivation in mind instead of serving their users. There was a lot of notoriety around the Java language for a long time, and perhaps that's where the seduction was. This seeming lack of respect for programmers is the major reason I moved away from Java and didn't want anything to do withAl#ch002 xhtml#GBS0007. 01] it for such a long time When I did start looking into Java again, something about Java 8 felt very different, as if a fundamental shift had occurred in the designers'attitude about the language and its users. Many features and libraries that had been warts on the language were fixed after years of ignoring user complaints. New features felt very different, as if there were ney folks on boardl#cho02 xhtml# GBS0007. 02) who were extremely interested in programmer experience. These features were--finally---working to make the language better rather than just quickly adding ideas without delving into their implications. And some of the new features are downright elegant (or at least, as elegant as possible given Java constraints). I can only guess that some person or people have departed the language group and thisl I#ch002 xhtml#GBS0007.03 has changed the perspective. Because of this new focus by the language developers---and I don't think I'm imagining it--writing this book has been dramatically better than past experiences. Java 8 contains fundamental and important improvements. Alas, because of Java's rigid backwards-compatibility promise, these improvements required great effort so it's unlikely we'll see anything this dramatic#ch002xhtml#GBS0007.04] again(I hope I'm wrong about this). Nonetheless, I applaud those who have turned the ship as much as they have and set the language on a better course For the first time I can ever recall, I found myself saying"I love that! about some of the Java code I've been able to write in Java 8 Ultimately, the timing for this book seems good, because Java 8 introduces important features that strongly [ch002 xhtml#GBS0007.05) affect the way code is written, while---so far---Java 9 seems to focus on the understory of the language, bringing important infrastructure features but not those that affect the kind of coding focused on in this book. However, because it's an eBook, if i discover something I think requires an update or an addition, I can push the new version to existing customers.. :[#ch002. html#tested-examples, section level2] Tested Examples The code examples[#ch002xhtml#GBS0008. 01] in this book compile with Java 8 and the Gradle build tool. All the examples are in a freely-accessible github reposit Without a built-in test framework with tests that run every time you do a build of your system, you have no way of knowing whether your code is reliable. To accomplish this in the book I created a test system to display and validate the output of most examples. The output[#ch002. html# GBS0008.02] from running an example is attached, as a block comment, at the end of examples that produce output. In some cases only the first few lines are shown, or first and last lines. Embedded output improves the reading and learning experience, and provides yet another way to verify the correctness of the examples . # ch002. html#popularity. section level2) Popularity Java's popularity has significant implications. If you learn it, getting# cho02 xhtml# GBS0008.03] a job will probably be easier. There are a lot more training materials, courses, and other learning resources available. If you' re starting a company and you choose to work in Java, it's much easier to find programmers, and that's a compelling argument Short-term thinking is almost always a bad idea. Don't use Java if you really don' t like it---using it just to get a job is an unhappy life choice. It#ch002 xhtml#GB50008.04] As a company, think hard before choosing Java just because you can hire people. There might be another language that makes fewer employees far more productive for your particular need But if you do enjoy it, if Java does call to you, then welcome. I hope this book will enrich your programming experience #ch002. html#android-programmers section level2) Android Programmers Ive made this book as"Java 8 as possible, "so if you want to programIt#cho02 xhtml# GBS0008.05] for Android devices you must study Java 5, which I cover in Thinking in Java, 4th edition. At the time of publishing of On Java 8, Thinking inJava,4thEditionhasbecomeafreedownloadavailablethroughwww.onjava8.com.ThinkinginJava,4thEdition is available in print from Prentice-Hall. In addition, there are many other resources that specialize in Android programmIng. #choo. xhtml#this-is-only-an-ebook section. level2 This is Only[l#cho02 xhtml# GBS0009.01] an e Book OnJava8isonlyavailableasanebooKandonlyviawww.onjava8.com.Anyothersourceordelivery mechanism is illegitimate. There is no print version Thisiscopyrightedwork.Donotpostorshareitinanywaywithoutpermissionviamindviewinc\@gmail.com.Youmay use the examples for teaching, as long as they are not republished without permission and attribution See the Copyright. txt [t#ch002 xhtml#GBS0009.02]file in the example distribution for full details This book is far too large to publish as a single print volume, and my intent has always been to only publish it as an e Book. Color syntax highlighting for code listings is, alone, worth the cost of admission. Searchability, font resizing or text-to-voice for the vision-impaired, the fact you can always keep it with you---there are so many benefits f#ch002 xhtml#GBS0009.03 to eBooks it's hard to name them all. Anyone buying this book needs a computer to run the programs and write code, and the e Book reads nicely on a computer(I was also surprised to discover that it even reads tolerably well on a phone). However, the best reading experience is on a tablet computer. Tablets are inexpensive enough that you can now buy one for less than you'd pay for an equivalent[#ch002 xhtml# GBS0009.04 print version of this book. It's much easier to read a tablet in bed (for example)than trying to manage the pages of a physical book, especially one this big. When working at your computer, you don't have to hold the pages open when using a tablet at your side. It might feel different at first, but I think you'll find the benefits far outweigh the discomfort of adapting I've done the research, I(#ch002 xhtml# GBS0009.05) and Google Play Books works on, and provides a very nice reading experience, every platform, including Linux and ioS devices. As an experiment, I 've decided to try publishing exclusively through google books Note: At the time of this writing, reading the book through the Google Play Books web browser app was---although tolerable---the least satisfying viewing experience. strongly advocate usingl/(#ch002 xhtml#GBS0010.01 a tablet computer instead.∴ [#ch002 xhtml#colophon. section level2 Colophon This book was written with Pandoc-flavored Markdown, and produced into e Pub version 3 format using Pandoc The body font is Georgia and the headline font is Verdana. The code font is Ubuntu Mono, because it is especially compact and allows more characters on a line without wrapping. I chose to place the code inline(rather than make listings into images, [#ch002 xhtml#GBS0010.02) as I've seen some books do because it was important to me that the reader be able to resize the font of the code listings when they resize the body font (otherwise, really, what's the point The build process for the book was automated, as well as the process to extract, compile and test the code examples. All automation was achieved through fairly extensive programs I wrote in Python 3 #cho02 xhtml#cover-design. section level3 n#ch002 xhtml#GBS0010.03 Cover Design The cover of On Java 8 is from a mosaic created through the Works Progress Administration (WPA, a huge project during the US Great Depression from 1935-1943 which put millions of out-of-work-people back to work). It also reminds me of the illustrations from The Wizard of oz series of books My friend and designer Daniel Will-harris(Www.will harris. com )and I just liked the image: [style="display: none, ")[#ch002 xhtml#GBS0010.04]::::: :::#ch002 xhtml#thanks. section. level2] Thanks Thanks to Eric Evans(author of Domain-Driven Design )for suggesting the book title and to everyone else in the conference newsgroups for their help in finding the title Thanks to James Ward for starting me with the Gradle build tool for this book, and for his help and friendship over the years. Thanks to Ben Muschko for his work polishing the build files, and Hans Dockter for giving[ [ch002.html#GBS0010.05) Ben the time Jeremy Cerise and Bill Frasure came to the developer retreat for the book and followed up with valuable help. Thanks to all who have taken the time and effort to come to my conferences, workshops developer retreats and other events in my town of Crested Butte, Colorado. Your contributions might not be easily seen, but they are deeply Important :#ch002 xhtml#dedication section level2] Dedication For my beloved father, I#ch002 xhtml#GBS0011.01]E. Wayne EckeL. April 1, 1924---November 23, 2016 (style="display: none; ")[#ch002 xhtml# GBS0011.02] [#ch003 xhtml (style="display: none; 1[[#ch003 xhtml# GBS0012.01] :#ch003 xhtml#introduction section level1 Introduction "The limits of my language are the limits of my world "---Wittgenstein This is true of both spoken/written languages and programming languages. It's often subtle: A language gently guides you into certain modes of thought and away from others. Java is particularly opinionated Java is a derived language. The original language designers didn't want to use C++ for a project, so created t# ch003 xhtml#GBS0012.02) a new language which unsurprisingly looked a lot like C++, but with improvements (their original project never came to fruition). The core changes were the incorporation of a virtual machine and garbage collection, both of which are described in detail in this book. Java is also responsible for pushing the industry forward in other ways; for example, most languages are now expected to includell#ch003xhtml#GBS0012.03 documentation markup syntax and a tool to produce HTML documentation One of the most predominant Java concepts came from the Small Talk language, which insists that the " object (described in the next chapter) is the fundamental unit of programming, so everything must be an object. Time has tested this belief and found it overenthusiastic. Some folks even declare that objects are a complete failurell (#ch003 xhtml#GBS0012.04 and should be discarded. Personally, I find that making everything an object is not only an unnecessary burden but also pushes many designs in a poor direction. However, there are still situations where objects shine. Requiring that everything be an object(especially all the way down to the lowest level)is a design mistake, but banning objects altogether seems equally draconian Other Javallf#ch003 xhtml#GBS0012.05] language decisions haven't panned out as promised. Throughout this book I attempt to explain these so you not only understand those features, but also why they might not feel quite right to you It's not about declaring that Java is a good language or a bad one. If you understand the flaws and limitations of the language you will 1. Not get stymied when you encounter a feature that seems"off 2. [f#cho03 xhtml#GBS0013.01 Design and code better by knowing where the boundaries are Programming is about managing complexity: the complexity of the problem, laid upon the complexity of the machine Because of this complexity, most of our programming projects fail Many language design decisions are made with complexity in mind, but at some point other issues are considered essential. Inevitably, those other issues[(#ch003 xhtml# GBS0013.02] are what cause programmers to eventually"hit the wall"with a language. For example, C++ had to be backward-compatible with c (to allow easy migration for C programmers), as well as efficient. those are both useful goals and account for much of the success of C++, but they also expose extra complexity that prevent some projects from finishing. Certainly, you can blame programmers and management,[#ch003 xhtml#GBS0013.03 but if a language can help by catching your mistakes, why shouldn't it Visual BASIC (VB)was tied to BASIC, which wasn't really designed as an extensible language. All the extensions piled upon VB have produced some truly un-maintainable syntax. Perl is backward-compatible with awk, sed, grep, and other Unix tools it was meant to replace, and as a result it is often accused of producing"write-only[ I# ch003 xhtml#GBS0013. 04) code"(that is, you can't read your own code). On the other hand, C++, VB, Perl, and other languages such as SmallTalk had some of their design efforts focused on the issue of complexity and as a result are remarkably successful in solving certain types of problems The communication revolution enables all of us to communicate with each other more easily: one-on-one as well as in groups and as[f#ch003 xhtml#GBS0013.05 a planet. I've heard it suggested that the next revolution is the formation of a kind of global mind that results from enough people and enough interconnectedness. Java might or might not be one of the tools for that revolution, but at least the possibility has made me feel like I'm doing something meaningful by attempting to teach the language #ch003 xhtml#prerequisites section level2) Prerequisites This book assumes you have some[l# ch003 xhtml#GBS0014.01] programming familiarity, so you understand A program is a collection of statements The idea of a subroutine/function/macro Control statements such as"if"and looping constructs such as while 命Etc You might have learned this in many places, typically school, books, or the Internet. As long as you you feel comfortable with the basic ideas of programming, you can work through this book. [f#ch003 xhtml#GBS0014.02] The Thinking in C multimedia seminar freely downloadable from OnJava8 com will bring you up to speed on the fundamentals necessary to learn Java. On Java 8 does introduce the concepts of object-oriented programming(ooP) and Java's basic control mechanisms Although I make references to C and C++ language features, these are not intended to be insider comments, but instead to help all programmers[(#ch003 xhtml#GBS0014.03 put Java in perspective with those languages, from which, after all, Java is descended. I attempt to make these references simple and to explain anything that might be unfamiliar to a non- C/C++ programmer: [#cho03 xhtml#jdk-html-documentation section level2] JDK HTML Documentation The Java Development Kit (JDK)from Oracle (a free download )comes with documentation in electronic form, readable through your Web browser. Unless necessary, thisl(#ch003 xhtml#GBS0014.04 book will not repeat that documentation, because it's usually much faster to find the class descriptions with your browser than to look them up in a book(also, the online documentation is current). I'lI simply refer to"the JDK documentation. "I'll provide extra descriptions of the classes only when it's necessary to supplement that documentation so you understand a particular example. #ch003 xhtml#thinking-in-c section. level2 ThinkinglIt#ch003xhtml#GBS0014.05]in C TheThinkinginCmultimediaseminarisfreelydownloadablefromwww.Onjava8.comthIsgivesanintroductionto the C syntax, operators, and functions that are the foundation of Java syntax. Thinking in c also provides a gentle introduction to coding, assuming even less about the student's programming background than does this book I commissioned Chuck Allison to create Thinking in C as[#ch003. html#GBS.0015.01] a standalone product, which was later included in book CDs, and finally reworked as a free download. By freely providing this seminar online, I can ensure that everyone begins with adequate preparation.::: # ch003 xhtml#source-code. section. level21 Source code

试读 127P On Java 8 java编程思想 pdf下载

关注 私信 TA的资源

    On Java 8 java编程思想 pdf下载 40积分/C币 立即下载
    On Java 8 java编程思想 pdf下载第1页
    On Java 8 java编程思想 pdf下载第2页
    On Java 8 java编程思想 pdf下载第3页
    On Java 8 java编程思想 pdf下载第4页
    On Java 8 java编程思想 pdf下载第5页
    On Java 8 java编程思想 pdf下载第6页
    On Java 8 java编程思想 pdf下载第7页
    On Java 8 java编程思想 pdf下载第8页
    On Java 8 java编程思想 pdf下载第9页
    On Java 8 java编程思想 pdf下载第10页
    On Java 8 java编程思想 pdf下载第11页
    On Java 8 java编程思想 pdf下载第12页
    On Java 8 java编程思想 pdf下载第13页
    On Java 8 java编程思想 pdf下载第14页
    On Java 8 java编程思想 pdf下载第15页
    On Java 8 java编程思想 pdf下载第16页
    On Java 8 java编程思想 pdf下载第17页
    On Java 8 java编程思想 pdf下载第18页
    On Java 8 java编程思想 pdf下载第19页
    On Java 8 java编程思想 pdf下载第20页


    40积分/C币 立即下载 >