the blank final field factors may not have been initialized

Posted danieldai

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了the blank final field factors may not have been initialized相关的知识,希望对你有一定的参考价值。

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的主要内容,如果未能解决你的问题,请参考以下文章