Why was constness removed from Java and C#?

后端 未结 5 2183
予麋鹿
予麋鹿 2021-02-20 00:45

I know this has been discussed many times, but I am not sure I really understand why Java and C# designers chose to omit this feature from these languages. I am not int

5条回答
  •  -上瘾入骨i
    2021-02-20 01:24

    Java have its own version of const; final. Joshua Bloch describes in his Effective Java how you effectively use the final keyword. (btw, const is a reserved keyword in Java, for future discrepancies)

提交回复
热议问题