دانلود کتاب Java Cookbook - Problems and Solutions for Java Developers (final release).
by Ian F. Darwin
|
عنوان فارسی: Java Cookbook - مشکلات و راه حل برای توسعه دهندگان جاوا (نسخه نهایی). |
دانلود کتاب
جزییات کتاب
Java has seemed better suited to “development in the large,” or enterprise application development, than to the one-line, one-off script in Perl, Awk, or Python. That’s because it is a compiled, object-oriented language. However, this suitability has changed somewhat with the appearance of JShell (see Recipe 1.4).
I illustrate many techniques with shorter Java class examples and even code fragments; some of the simpler ones will be shown using JShell. All of the code examples (other than some one- or two-liners) are in one of my public GitHub repositories, so you can rest assured that every fragment of code you see here has been compiled, and most have been run recently.
Some of the longer examples in this book are tools that I originally wrote to automate some mundane task or another. For example, a tool called MkIndex (in the javasrc repository) reads the top-level directory of the place where I keep my Java example source code, and it builds a browser-friendly index.html file for that directory.
Another example is XmlForm, which was used to convert parts of the manuscript from XML into the form needed by another publishing software. XmlForm also handled—by use of another program, GetMark—full and partial code insertions from the javasrc directory into the book manuscript. XmlForm is included in the Github repository I mentioned, as is a later version of GetMark, though neither of these was used in building the fourth edition. These days, O’Reilly’s Atlas publishing software uses Asciidoctor, which provides the mechanism we use for inserting files and parts of files into the book
This is the fourth edition of this book, and it has been shaped by many people and by the myriad changes that Java has undergone over its first two decades of popularity. Readers interested in Java’s history can refer to Appendix A.
---------------------------
Who This Book Is For?
I’m going to assume that you know the basics of Java. I won’t tell you how to println a string, nor how to write a class that extends another and/or implements an interface. I presume you’ve taken a Java course such as Learning Tree’s Introduction or that you’ve studied an introductory book such as Head First Java, Learning Java, or Java in a Nutshell (O’Reilly). However, Chapter 1 covers some techniques that you might not know very well and that are necessary to understand some of the later material. Feel free to skip around! Both the printed version of the book and the electronic copy are heavily cross-referenced.
-----------------------
Java continues to grow and evolve, and this cookbook continues to evolve in tandem. With this guide, you’ll get up to speed right away with hundreds of hands-on recipes across a broad range of Java topics. You’ll learn useful techniques for everything from string handling and functional programming to network communication.
Each recipe includes self-contained code solutions that you can freely use, along with a discussion of how and why they work. If you’re familiar with Java basics, this cookbook will bolster your knowledge of the language and its many recent changes, including how to apply them in your day-to-day development. This updated edition covers changes through Java 12 and parts of 13 and 14.
Recipes include:
- Blade, Laravel's powerful custom templating tool
- Methods for compiling, running, and debugging
- Packaging Java classes and building applications
- Manipulating, comparing, and rearranging text
- Regular expressions for string and pattern matching
- Handling numbers, dates, and times
- Structuring data with collections, arrays, and other types
- Object-oriented and functional programming techniques
- Input/output, directory, and filesystem operations
- Network programming on both client and server
- Processing JSON for data interchange
- Multithreading and concurrency
- Using Java in big data applications
- Interfacing Java with other languages