aspose file tools*
The moose likes Java in General and the fly likes core java,purpose of volatile and transient Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "core java,purpose of volatile and transient" Watch "core java,purpose of volatile and transient" New topic
Author

core java,purpose of volatile and transient

sudha priya
Greenhorn

Joined: Nov 06, 2006
Posts: 3
What is volatile and transient variables and the diffrence between them? an use in the real time?
Thank You.
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

Not a Servlet question, moving to the Java in General (intermediate) forum.

Dave
Ulas Ergin
Ranch Hand

Joined: Oct 10, 2002
Posts: 77
transient: indicates that the member of the class need not be serialized during serializatin process (hence need not be restored during dererialization)

volatile: indicates that the member variable is accessed by multiple threads simultaneously and certain optimizations should not be allied for it.See Java Memory Model for detailed info.
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14276
    
  21

Did you try Google? Searching for "java transient" or "java volatile" will give you a lot of information very quickly.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: core java,purpose of volatile and transient