
- 352 pages
- English
- ePUB (mobile friendly)
- Available on iOS & Android
eBook - ePub
100 Java Mistakes and How to Avoid Them
About this book
Dodge the common mistakes that even senior developers make, take full advantage of static analysis tools, and deliver robust and error-free Java code.
Whenever you make a mistake writing Java, it’s almost guaranteed that someone else has made it before! In 100 Java Mistakes and How To Avoid Them you’ll learn about the common and the not-so-common antipatterns, errors, and tricky bits that trip up almost every Java developer.
Inside 100 Java Mistakes and How To Avoid Them you will learn how to:
Each Java mistake in this handy guide comes with an illustrative code sample, an explanation of why the mistake occurs, and an actionable “ways to avoid this” section to help you dodge the error. Plus, you’ll benefit from useful static analysis sidebars that let you know when mistakes will—and won’t—be spotted by static analysis tools.
Foreword by Cay Horstmann.
About the technology
Minor bugs in development can become major problems in production. It’s much better to spot and fix your mistakes before they get that far! This one-of-a-kind book shines a light on the most common Java slip-ups and shows you exactly how to avoid making them in the first place.
About the book
100 Java Mistakes and How To Avoid Them highlights 100 Java coding errors—from beginner missteps to mistakes even Java experts don’t know they’re making. Each case includes clear examples to show you what to look for and concrete troubleshooting advice. You’ll learn to use static analysis tools like IntelliJ IDEA and SonarLint to ensure you’re consistently delivering exceptional Java, discover how unit tests and defensive coding can keep your code clean, and even learn to write your own bug-busting plugins.
What's inside
About the reader
For Java developers of all skill levels.
About the author
Tagir Valeev is a technical lead in JetBrains and a Java Champion. He designed and developed many code inspections for IntelliJ IDEA built-in static analyzer.
The technical editor on this book was Jean-François Morin.
Table of Contents
1 Managing code quality
2 Expressions
3 Program structure
4 Numbers
5 Common exceptions
6 Strings
7 Comparing objects
8 Collections and maps
9 Library methods
10 Unit testing
A Static analysis annotations
B Extending static analysis tools
Whenever you make a mistake writing Java, it’s almost guaranteed that someone else has made it before! In 100 Java Mistakes and How To Avoid Them you’ll learn about the common and the not-so-common antipatterns, errors, and tricky bits that trip up almost every Java developer.
Inside 100 Java Mistakes and How To Avoid Them you will learn how to:
- Write better Java programs
- Recognize common mistakes during programming
- Create fewer bugs and save time for debugging and testing
- Get help from static analyzers during programming
- Configure static analysis tools to reduce the number of false reports
- Extend static analysis tools with custom plugins
Each Java mistake in this handy guide comes with an illustrative code sample, an explanation of why the mistake occurs, and an actionable “ways to avoid this” section to help you dodge the error. Plus, you’ll benefit from useful static analysis sidebars that let you know when mistakes will—and won’t—be spotted by static analysis tools.
Foreword by Cay Horstmann.
About the technology
Minor bugs in development can become major problems in production. It’s much better to spot and fix your mistakes before they get that far! This one-of-a-kind book shines a light on the most common Java slip-ups and shows you exactly how to avoid making them in the first place.
About the book
100 Java Mistakes and How To Avoid Them highlights 100 Java coding errors—from beginner missteps to mistakes even Java experts don’t know they’re making. Each case includes clear examples to show you what to look for and concrete troubleshooting advice. You’ll learn to use static analysis tools like IntelliJ IDEA and SonarLint to ensure you’re consistently delivering exceptional Java, discover how unit tests and defensive coding can keep your code clean, and even learn to write your own bug-busting plugins.
What's inside
- Recognize bugs and antipatterns during programming
- Highly-effective debugging and testing
- Get help from static analyzers
About the reader
For Java developers of all skill levels.
About the author
Tagir Valeev is a technical lead in JetBrains and a Java Champion. He designed and developed many code inspections for IntelliJ IDEA built-in static analyzer.
The technical editor on this book was Jean-François Morin.
Table of Contents
1 Managing code quality
2 Expressions
3 Program structure
4 Numbers
5 Common exceptions
6 Strings
7 Comparing objects
8 Collections and maps
9 Library methods
10 Unit testing
A Static analysis annotations
B Extending static analysis tools
Frequently asked questions
Yes, you can cancel anytime from the Subscription tab in your account settings on the Perlego website. Your subscription will stay active until the end of your current billing period. Learn how to cancel your subscription.
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
Perlego offers two plans: Essential and Complete
- Essential is ideal for learners and professionals who enjoy exploring a wide range of subjects. Access the Essential Library with 800,000+ trusted titles and best-sellers across business, personal growth, and the humanities. Includes unlimited reading time and Standard Read Aloud voice.
- Complete: Perfect for advanced learners and researchers needing full, unrestricted access. Unlock 1.4M+ books across hundreds of subjects, including academic and specialized titles. The Complete Plan also includes advanced features like Premium Read Aloud and Research Assistant.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Yes! You can use the Perlego app on both iOS or Android devices to read anytime, anywhere — even offline. Perfect for commutes or when you’re on the go.
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app.
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app.
Yes, you can access 100 Java Mistakes and How to Avoid Them by Tagir Valeev in PDF and/or ePUB format, as well as other popular books in Computer Science & Programming in Java. We have over one million books available in our catalogue for you to explore.
Information
Table of contents
- 100 Java Mistakes and How to Avoid Them
- copyright
- contents
- foreword
- preface
- acknowledgments
- about this book
- about the author
- about the cover illustration
- 1 Managing code quality
- 2 Expressions
- 3 Program structure
- 4 Numbers
- 5 Common exceptions
- 6 Strings
- 7 Comparing objects
- 8 Collections and maps
- 9 Library methods
- 10 Unit testing
- appendix A Static analysis annotations
- appendix B Extending static analysis tools