|
Java Reference Home | Smart Soft Home |
|
|
final
The keyword final can be used in one of two ways:
as a variable modifier or as a method modifier.
Description #1 - Variable ModifierIndicates that a member field is constant. This modifier is typically used with the static modifier.Example #1 - Variable Modifierpublic static final double pi = 3.14; Description #2 - Method ModifierIndicates that a method can not be overridden.Example #2 - Method Modifier
public final void foo(){
...
}
|
|