This article discusses the challenges of passing many arguments to a method in Java. It presents two design patterns to mitigate these issues: the Parameter Object Pattern and the Java Bean Pattern.
Search Results for: Best practices
Best Practices for Unit Testing in Java
Learn about best practices for unit testing in Java.
Best Practices for REST API Error Handling
Learn about some of the best practices for handling REST API errors, including useful approaches for providing users with additional relevant information
Lambda Expressions and Functional Interfaces: Tips and Best Practices
Tips and best practices on using Java 8 lambdas and functional interfaces.
Global Exception Handling with Spring Cloud Gateway
Explore the nuances of implementing a global exception-handling strategy within Spring Cloud Gateway, delving into its technicalities and best practices.
Checking if an Object’s Type Is Enum
Explore various approaches and best practices for determining if an object’s type is an enum.
How to Avoid NoSuchElementException in Stream API
The NoSuchElementException exception occurs when accessing an element that doesn’t exist. Find out the best practices of avoiding it and writing robust code.
How to Document Generic Type Parameters in Javadoc
Explore best practices for using the @param tag to document generic type parameters.
Difference Between implementation and compile in Gradle
Learn the difference between “implementation” and “compile” in Gradle and provide best practices for effective dependency management
Implicit Wait vs Explicit Wait in Selenium Webdriver
Explore the differences between the wait types in Selenium and learn a few best practices when using them in tests.
Java Weekly, Issue 429
Java 18 GC improvements, cooperative thread interruptions, best practices for Java projects, feature flags, and scaling bottleneck.
Secondary Indexes in Cassandra
Learn how to use secondary indexes in Apache Cassandra and also understand some best practices and recommendations.
Initialization Vector for Encryption
Learn how to use an Initialization Vector (IV) with encryption algorithms and the best practices while using the IV
Guide to ArrayStoreException
Learn the cause of ArrayStoreException, how to handle it, and best practices for avoiding it
Java Weekly, Issue 300
Issue 300 🙂 An overview of Maven archetypes and alternatives for project scaffolding, and a look at best practices for implementing TestProject.
Java Optional as Return Type
Learn the best practices and when to return the Optional type in Java.
Understanding the NumberFormatException in Java
Learn the various causes of NumberFormatException in Java and some best practices for avoiding it.
Concurrent Strategies using MDBs
Learn some best practices for working with Message-Driven Beans.
The Baeldung Weekly Review 8
The 8th weekly review, going wide from the design of a new Hypermedia type to best practices on Unit Testing, and a slew of Spring releases.
Apache HttpClient Cookbook
HttpClient 4 examples and best practices.