Skip to Content
Java Coding Problems - Second Edition
book

Java Coding Problems - Second Edition

by Anghel Leonard
March 2024
Intermediate to advanced
798 pages
18h 48m
English
Packt Publishing
Content preview from Java Coding Problems - Second Edition

1

Text Blocks, Locales, Numbers, and Math

This chapter includes 37 problems covering 4 main topics: text blocks, locales, numbers, and mathematical operations. We will start with text blocks (elegant multiline strings introduced in JDK 13 (JEP 355, preview)/ JDK 15 (JEP 378, final)), continue with problems for creating a Java Locale, including localized locales (JDK 19’s ofLocalizedPattern()), and finish with problems about numbers and math, such as the Babylonian method for computing the square root and different corner cases of results overflows. The last part of the chapter is dedicated to JDK 17’s (JEP 356, final) new API for pseudo-random generators.

By the end of this chapter, you’ll be up to date with all the new and cool JDK features ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Java Coding Problems

Java Coding Problems

Anghel Leonard
Head First Java, 3rd Edition

Head First Java, 3rd Edition

Kathy Sierra, Bert Bates, Trisha Gee
Learning Java, 6th Edition

Learning Java, 6th Edition

Marc Loy, Patrick Niemeyer, Daniel Leuck
The Well-Grounded Java Developer, Second Edition

The Well-Grounded Java Developer, Second Edition

Benjamin Evans, Martijn Verburg, Jason Clark

Publisher Resources

ISBN: 9781837633944Supplemental Content