Add a private constructor to hide the implicit one

What you will learn here about SonarQube

  • Add a private constructor to hide the implicit one

Generally Class which has only static members generally consider as utility class which can’t be instantiated. The utility class members called by using the class name. So when we have class which has only static members then SonarQube raise issue Add a private constructor to hide the implicit one. So here we will see how to solve, Add a private constructor to hide the implicit one issue.

Add a private constructor to hide the implicit one

Add a private constructor to hide the implicit one issue comes on sonarQube when we have utility class or class which has only static members which is shown below.
Add a private constructor to hide the implicit one

The solution for Add a private constructor to hide the implicit one issue is very simple. We just have to add private constructor which is shown below
Add a private constructor to hide the implicit one sonarQube

You may also like...