Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

why valatile variables can not be final.?

 
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: 3752
10
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic