在java中有3个地方须要用finalkeyword:
1、假设一个不希望被继承,那么用final来修饰这个类
2、假设一个方法不须要被重写。那么这种方法用final来修饰
3、假设一个变量的值不希望被改变。那么这个变量用final来修饰