45,000 Jobs - Get an Interview Call,  Post Your Resume Here
SURESHKUMAR.NET FORUMS
Registered Member Login:
Not a member? Register today!



Welcome to the SURESHKUMAR.NET FORUMS.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.




Java Interview / Technical Questions Kindly solve an many as questions you can. It will sharpen your skills and those solutions will help others too.

J2EE - What is the difference between transient variable, volatile variable

        

Reply
 
LinkBack Thread Tools Display Modes
Old 23-01-07, 02:51 PM   #1 (permalink)
Junior Member
 
preethisingh's Avatar
 
Join Date: Jul 2006
Posts: 1,391
Thanks: 1
Thanked 28 Times in 25 Posts
Rep Power: 19 preethisingh is a jewel in the rough preethisingh is a jewel in the rough preethisingh is a jewel in the rough
J2EE - What is the difference between transient variable, volatile variable

What is the difference between transient variable, volatile variable <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>

preethisingh is offline Offline   Reply With Quote
The Following User Says Thank You to preethisingh For This Useful Post:
lalitha devi (08-10-09)
Old 22-04-08, 12:41 PM   #2 (permalink)
Junior Member
 
Join Date: Apr 2008
Age: 1
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 2 Gemsbond is on a distinguished road
Smile Re: J2EE - What is the difference between transient variable, volatile variable

volatile modifier requests the Java VM to always access the shared copy of the variable so the its most current value is always read. If two or more threads access a member variable, AND one or more threads might change that variable's value, AND ALL of the threads do not use synchronization (methods or blocks) to read and/or write the value, then that member variable must be declared volatile to ensure all threads see the changed value.when you don't want to serialize a member variable then you define that variable as transient.
Gemsbond is offline Offline   Reply With Quote
Reply

Tags
difference , j2ee , transient , variable , volatile


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need .Net Interview Questions vidyasagarkumar VB / ASP.NET Technologies 6 06-09-07 12:37 AM
J2EE - What is the difference between classpath and path variable? preethisingh Java Interview / Technical Questions 0 23-01-07 02:37 PM
J2EE - What is the difference between a field variable and a local variable? preethisingh Java Interview / Technical Questions 0 23-01-07 01:59 PM
C language -What is the difference between declaring a variable and defining a variable? GEEK ds. c , c++ Interview / Technical Questions 0 23-01-07 01:39 PM
Java Contest-13 with answers keerthi JAVA Technologies 8 31-12-06 09:44 AM


All times are GMT +6.5. The time now is 04:30 AM.

More Interview Questions Here...

Content Relevant URLs by vBSEO 3.3.0