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. doesn't work with 3 , 7 and 5 but with numbers hig
View Tutorial          By: asd at 2013-05-11 09:25:30

2. Hiii....i am using windows 8..jdk1.7.51 and netbea
View Tutorial          By: Pravin Kamble at 2014-05-03 07:00:12

3. Abstract class example is good, What is the differ
View Tutorial          By: megakumar at 2011-04-10 04:15:10

4. would like to have copy of clock
View Tutorial          By: jim johnson at 2008-04-10 17:30:06

5. i am not getting output by using this code..after
View Tutorial          By: dhaval at 2011-01-03 03:42:28

6. Is site ki badolat main C++ mein paas ho gya !
View Tutorial          By: sharif at 2011-08-06 10:06:31

7. sir can this be the role of java in internet if no
View Tutorial          By: shantanu khanduri at 2012-05-28 07:00:11

8. The program will work only need to change

View Tutorial          By: LEENA NARULA at 2012-06-15 06:45:06

9. Can you please send me the full code in sending an
View Tutorial          By: jen at 2008-05-28 00:22:21

10. how to download suport to my phone
send me

View Tutorial          By: dede.mouljadie at 2012-04-28 09:39:21