final

2017-09-08  本文已影响0人  沫晴er

final 修饰的变量会变成常量,不能被更改

final int a = 1;

用final修饰的类不可以被继承

用final修饰的方法不能被重写

上一篇 下一篇

猜你喜欢

热点阅读