In Java singleton class, I want to make a final constant like below code.
private final int threshold = 3;// Noncompliant Code Example by Sonal lintprivate static final int THRESHOLD = 3;// Compliant code by Sonarlint
My question is, why singleton class should have the static keyword in a final int/string constant as this class has only one instance?