本帖最后由 刘勇强 于 2013-5-25 19:18 编辑
同楼上 类在定义时被final修饰,就表明该类是不允许继承的
To stop a class being extended, the class declaration must explicitly say it cannot be inherited. This is achieved by using the "final" keyword
如果你没注意看,定义了一个final 类String的子类,会提示你 error :cannot inherit from final java.lang.String
|