There is no need to use the final
modifier inside a final
class. Everything in it is final
by default.
Noncompliant code example
final class MyClass {
public final String getName() { // Noncompliant
return name;
}
}
Compliant solution
final class MyClass {
public String getName() { // Compliant
return name;
}
}