I know that when you create the final
method in java, it cannot be overridden.
When the method is private
, only methods and members of this class in which this method exists can access it.
So, does this mean that since the method cannot be accessed, it makes no sense to try to check if it can be overridden because I wrote the following declaration and I get the following warning:
private addCode method declared final
private final void addCode(String code) {
source share