Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

why valatile variables can not be final.?  RSS feed

 
Prashant Neginahal
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ALL,
why valatile variables can not be final.?
 
Paul Anilprem
Enthuware Software Support
Ranch Hand
Posts: 4097
33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Volatile and final are completely orthogonal properties. Volatile means the variable value is volatile (exteremly changeable) while final means it value will never change.
HTH,
Paul.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!