final

Definition

Final is used to create a variable that cannot be changed.

Examples

Final Variable

public static final double PI = 3.14;

this means that the value of PI will not change and will stay at 3.14

Final Method

Final Class

java.lang.String is a final class

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License