首页 > 其他 > 详细

the blank final field factors may not have been initialized

时间:2018-05-21 13:26:23      阅读:1067      评论:0      收藏:0      [点我收藏+]

技术分享图片

Q1: why we should initialize final field before completion of new instance?

  final means no changeable in java enviroment, the java compiler urges us follow the security violation.

Q2: how to resolve the error above?

  actually, it is because factors perhaps refer to passed parameter.

     so , keeping a good habit to add the prefix ‘this.‘ is good manner to resolve the error.

  this.factors = Arrays.copyof....

the blank final field factors may not have been initialized

原文:https://www.cnblogs.com/daniel123/p/9066487.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!