10:03:50 pm on January 17, 2010 | # |
In short use volatile when you want to prevent local caching of member variables by thread. For example to keep a counter across threads, mark it as volatile.
Use transient when you do not want to serialize the variable.
Leave a Comment
You must be logged in to post a comment.