Does the Java 'final' keyword actually improve security?

前端 未结 12 802
遥遥无期
遥遥无期 2021-01-07 19:07

While there are many reasons to use the \'final\' keyword in Java, one of the ones I keep hearing over and over again is that it makes your code more secure. While this seem

12条回答
  •  星月不相逢
    2021-01-07 19:24

    It's not 'security' in the sense of 'withstanding an attack'; it's more like 'harder to mess up by mistake'.

    I prefer the word 'safety'; i feel its more like preventing an accident, not malice.

提交回复
热议问题