Comment on Tutorial - Transient vs Volatile modifiers in Java By Reema sen



Comment Added by : Mohit

Comment Added at : 2010-11-18 00:26:24

Comment on Tutorial : Transient vs Volatile modifiers in Java By Reema sen
What is transient keyword in Java?

What is Serilization?

If you want to understand what is transient, then first learn what is serilization concept in Java if you are not familiar with that. Serilization is the process of making the object's state persistent. That means the state of the object is converted into stream of bytes and stored in a file. In the same way we can use the de-serilization concept to bring back the object's state from bytes. This is one of the important concept in Java programming because this serilization is mostly used in the networking programming. The object's which are needs to be transmitted through network has to be converted as bytes, for that purpose ever class or interface must implements Serilization interface. It is a marker interface without any methods.

What is Transient?

By default all the variables in the object is converted into the persistent. In some cases, you may want to avoid persisting some variables because you don't have the necesscity to persist those varibale. So, you can declare those variables as transient. if the variable is declared as transient, then it will not be persisted. It is the main purpose of the transient keyword.


View Tutorial



Ask a Question

Subscribe to Tutorials

Related Tutorials

Program using concept of byte long short and int in java

Update contents of a file within a jar file

Tomcat and httpd configured in port 8080 and 80

Java File

Java String

Count number of vowels, consonants and digits in a String in Java

Reverse a number in Java

Student marks calculation program in Java

Handling Fractions in Java

Calculate gross salary in Java

Calculate average sale of the week in Java

Vector in Java - Sample Program

MultiLevel Inheritance sample in Java

Multiple Inheritance sample in Java

Java program using Method Overriding

Archived Comments

1. I want to know the difference between java and .ne
View Tutorial          By: Jack at 2010-06-10 07:40:35

2. i want full of information abt java
View Tutorial          By: sagar at 2010-08-23 06:42:40

3. Very helpful stuff. Might I just add that you didn
View Tutorial          By: Donovan Aces at 2011-09-12 06:08:20

4. the default implementation of validate returns nul
View Tutorial          By: Jerry at 2009-02-01 11:12:06

5. example is good but in more deatin & advanteg
View Tutorial          By: smita at 2010-08-08 06:09:09

6. I have been hunting around for clarification whet
View Tutorial          By: MKP at 2013-02-06 09:08:27

7. How can i update status 1 and 0 in RMS ?
an

View Tutorial          By: maaz at 2011-06-16 02:54:28

8. Thanks heaps, I had the file already there but it
View Tutorial          By: Jb at 2009-05-14 08:13:08

9. S.N. Constructor & Description
1 String

View Tutorial          By: Jameesh at 2015-03-05 07:09:38

10. it giving me error in following statment (using Li
View Tutorial          By: Priyadarsan at 2007-11-27 22:31:56