Use **final** to communicate your intentions
You can use the JAVA keyword 'final' to communicate your intention for extension and use of variables.
public final class ThisShouldNeverBeExtended {
}
public final neverOverrideThisMethod() {
}
private final int thisFielfValueWillNeverChange;
final int thisLocalVariableValueWillNeverChange = 0;
Written by Raúl Raja
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Dessign patterns
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#