This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes Java in General and the fly likes modifiers Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "modifiers" Watch "modifiers" New topic


rajesh ramalingam

Joined: Dec 15, 2002
Posts: 1
Why cannot a variable be final and volatile?
David Weitzman
Ranch Hand

Joined: Jul 27, 2001
Posts: 1365
volatile specifies some subtleties about the order of modifying and accessing a field in multithreaded environments, but since a final field never changes value the access order doesn't really matter.
I agree. Here's the link:
subject: modifiers
It's not a secret anymore!