Cannot refer to a non-final variable inside an inner class defined in a different method

前端 未结 20 2198
一向
一向 2020-11-21 05:04

Edited: I need to change the values of several variables as they run several times thorugh a timer. I need to keep updating the values with every iteration through the timer

20条回答
  •  清酒与你
    2020-11-21 05:51

    If the variable required to be final, cannot be then you can assign the value of the variable to another variable and make THAT final so you can use it instead.

提交回复
热议问题