100 Java Mistakes and How to Avoid Them

  • 6h 7m
  • Tagir Valeev
  • Manning Publications
  • 2024

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:

  • 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.

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.

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.

In this Book

  • Foreword
  • About This Book
  • About the Cover Illustration
  • Managing Code Quality
  • Expressions
  • Program Structure
  • Numbers
  • Common Exceptions
  • Strings
  • Comparing Objects
  • Collections and Maps
  • Library Methods
  • Unit Testing
SHOW MORE
FREE ACCESS

YOU MIGHT ALSO LIKE

Rating 4.6 of 37 users Rating 4.6 of 37 users (37)
Journey Java Journey
Rating 4.5 of 8 users Rating 4.5 of 8 users (8)