Digital List Price: | CDN$ 84.99 |
Print List Price: | CDN$ 108.80 |
Kindle Price: | CDN$ 81.37 Save CDN$ 27.43 (25%) |
includes free international wireless delivery via Amazon Whispernet | |
Sold by: | Amazon.com.ca, Inc. |

Download the free Kindle app and start reading Kindle books instantly on your smartphone, tablet or computer – no Kindle device required. Learn more
Read instantly on your browser with Kindle for Web.
Using your mobile phone camera, scan the code below and download the Kindle app.
Java Cookbook: Problems and Solutions for Java Developers 4th Edition, Kindle Edition
Amazon Price | New from | Used from |
- Kindle Edition
$81.37 Read with Our Free App - Paperback
$85.65
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:
- 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
- ISBN-13978-1492072584
- Edition4th
- PublisherO'Reilly Media
- Publication dateMarch 17 2020
- LanguageEnglish
- File size7564 KB
- Kindle (5th Generation)
- Kindle Keyboard
- Kindle DX
- Kindle (2nd Generation)
- Kindle (1st Generation)
- Kindle Paperwhite
- Kindle Paperwhite (5th Generation)
- Kindle Touch
- Kindle
- Kindle Oasis
From the Publisher

From the Preface
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.
What’s in This Book?
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.
Product description
About the Author
Ian has a lifetime of experience in the software industry, and has worked with Java across many platforms and types of software, from Java’s initial release to the present. A founding member of Sun/Oracle Java Champions, Ian is the author of O’Reilly’s Java Cookbook and Android Cookbook among others, and has written and taught courses for undergraduate Computer Science and for leading career development company Learning Tree International.
--This text refers to the paperback edition.Product details
- ASIN : B08651PDL6
- Publisher : O'Reilly Media; 4th edition (March 17 2020)
- Language : English
- File size : 7564 KB
- Simultaneous device usage : Unlimited
- Text-to-Speech : Enabled
- Enhanced typesetting : Enabled
- X-Ray : Not Enabled
- Word Wise : Not Enabled
- Sticky notes : On Kindle Scribe
- Print length : 949 pages
- Best Sellers Rank: #904,780 in Kindle Store (See Top 100 in Kindle Store)
- #46 in Network Programming
- #210 in Java Programming (Kindle Store)
- #330 in Object-Oriented Software Design Textbooks
- Customer Reviews:
About the author

Ian has worked in the computer field for decades, on devices ranging in size from IBM mainframes down to pocket-sized devices like Android. He's written several O'Reilly books over the years, including the long-ago "Checking C Programs with Lint", the "Java Cookbook" which was translated into at least ten languages, and the "Android Cookbook". Ian also develops and teaches technology courses for companies like Learning Tree International and runs his own consultancy, RejmiNet Group Inc. He lives on a hobby farm north of Toronto with his wife, a cat and (formerly) some chickens - which explains, at long last, the animal on the cover of the Java Cookbook.
Customers who bought this item also bought
Customer reviews
Top reviews from other countries


1. What is written: whether content is presise, useful and actual.
2. How it's written: the way author delivers the knowledge; whether I resonate with author's style.
3. How content is delivered: the quality of the print or ebook.
So, my review:
**** (4 stars) for the "what is written".
I examined TOC and read some random chapters several times, and I mostly satisfied with the content and it's quality. Personally I'm not a fan of the cookbook format, yet I find some advices and brief theoretical blocks to be useful for a person trying I get productive with Java. My advice is to keep "Java complete reference" and "Effective Java" on your table, because aforementioned books accompany each other.
I cannot understand author's decision to write entire chapter about "data science and R" in the book about Java. Also Perl get mentioned here and there and there is an advice on marrying Java with it. Anyway, that's just an opinion and somebody might find it useful.
*** (3 stars) for the "how it's written". Some advices looks like a dirty hacks, and author mentions it. Personally, I prefer more academic and "dry" content.
Rant begins.
* (1 star) for the print book. It's horrible. The book is falling apart and I barely touched it. I opened chapter 5 and the sheet left in my hand. There is a glue layer on the front page. I could obtain a better print quality if I bought an ebook and printed it myself.
Seriously, the book costs $70. 70 dollars is a lot in Ukraine. So I paid them for this? Or it's designed that way - to spontaneously become an a la carte edition?
It is my second o'reilly book with new design (new branding with animals on completely white background) and it's my second rant on print and paper quality. I do expect more for my money. Much more. And I'm not spoiled by Addison-Wesley, Oracle Press and Pearson books. That's is the way how books should be made.
It's a pity that so we'll known and respected company delivers such unsatisfactory products. There is a reason why I choose text books, not ebooks, courses or online documentation.
I had 10+ new o'reilly books in my reading list, but now I'm afraid, I'll spend my money on something else.
I am sorry for raiting the book so low, author did a great job, but publisher spoiled my experience.


Reviewed in the United States 🇺🇸 on April 14, 2021
1. What is written: whether content is presise, useful and actual.
2. How it's written: the way author delivers the knowledge; whether I resonate with author's style.
3. How content is delivered: the quality of the print or ebook.
So, my review:
**** (4 stars) for the "what is written".
I examined TOC and read some random chapters several times, and I mostly satisfied with the content and it's quality. Personally I'm not a fan of the cookbook format, yet I find some advices and brief theoretical blocks to be useful for a person trying I get productive with Java. My advice is to keep "Java complete reference" and "Effective Java" on your table, because aforementioned books accompany each other.
I cannot understand author's decision to write entire chapter about "data science and R" in the book about Java. Also Perl get mentioned here and there and there is an advice on marrying Java with it. Anyway, that's just an opinion and somebody might find it useful.
*** (3 stars) for the "how it's written". Some advices looks like a dirty hacks, and author mentions it. Personally, I prefer more academic and "dry" content.
Rant begins.
* (1 star) for the print book. It's horrible. The book is falling apart and I barely touched it. I opened chapter 5 and the sheet left in my hand. There is a glue layer on the front page. I could obtain a better print quality if I bought an ebook and printed it myself.
Seriously, the book costs $70. 70 dollars is a lot in Ukraine. So I paid them for this? Or it's designed that way - to spontaneously become an a la carte edition?
It is my second o'reilly book with new design (new branding with animals on completely white background) and it's my second rant on print and paper quality. I do expect more for my money. Much more. And I'm not spoiled by Addison-Wesley, Oracle Press and Pearson books. That's is the way how books should be made.
It's a pity that so we'll known and respected company delivers such unsatisfactory products. There is a reason why I choose text books, not ebooks, courses or online documentation.
I had 10+ new o'reilly books in my reading list, but now I'm afraid, I'll spend my money on something else.
I am sorry for raiting the book so low, author did a great job, but publisher spoiled my experience.




Well enough written to be entertaining!
Ralph Kelsey Ohio Univ Comp Sci Dept
