Format specifiers should be used instead of concatenation

What you will learn here about SonarQube

  • Format specifiers should be used instead of concatenation

On the SonarQube one of common issue is format specifiers should be used instead of concatenation. So here we will see how to solve format specifiers should be used instead of concatenation issue.
format specifiers should be used instead of concatenation

Format specifiers should be used instead of concatenation

SonarQube cube shows Format specifiers should be used instead of concatenation issue when we concat string using + symbol. which is shown below
format specifiers should be used instead of concatenation sonarQube

The Solution on Format specifiers should be used instead of concatenation is use String.format() to concat the String which is shown below
format specifiers should be used instead of concatenation solution

You may also like...