java Transient variable

java Transient variable

View Answers

January 15, 2009 at 3:09 AM

Hi friend,

The transient is a keyword defined in the java programming language. Keywords are basically reserved words which
have specific meaning relevant to a compiler in java programming language likewise the transient keyword indicates the following :

-- The transient keyword is applicable to the member variables of a class.
-- The transient keyword is used to indicate that the member variable should not be serialized when the class instance
containing that transient variable is needed to be serialized.


For example if a variable is declared as transient in a Serializable
class and the class is written to an ObjectStream, the value of the variable can't be written to the stream
instead when the class is retrieved from the ObjectStream the value of the variable becomes null

public class Class1{

private transient String password;
}

For read more information on Keyword visit to :

http://www.roseindia.net/help/java/t/

Thanks









Related Tutorials/Questions & Answers:
java Transient variable - Java Beginners
java Transient variable  Hi, What is the use of transient variables in java?  Hi friend, The transient is a keyword defined... containing that transient variable is needed to be serialized. For example
Java Transient Variable
Java Transient Variables Before knowing the transient variable you should firs... mark that object as persistent. You can also say that the transient variable is a variable whose state does not  Serialized. An example of transient
Advertisements
What is a transient variable?
) with transient keyword becomes transient variable in java. It will be beneficiary.... For more details about transient variable in Java visit below link: http...What is a transient variable?   Hi, What is a transient variable
What is Transient variable in Java
Transient variable in Java is used to show that a particular field should not be serialized when the class instance containing that transient variable being... some variables from getting converted, one must declare the variable Transient
transient variables in java
transient variables in java  hello, What are transient variables in java?   hii,ADS_TO_REPLACE_1 Transient variables are variable that cannot be serialized
Transient Java Keyword
Transient Java Keyword In this section we will discuss about transient keyword in java. Transient is a keyword in java which is used to prevent any variable... with variable or field only. Transient variable in java is not saved because
transient keyword - Java Beginners
transient keyword  what is transient keyword in java.? plz explain with example
transient Java Keyword
transient Java Keyword       The transient is a keyword defined in the java programming language... to a compiler in java programming language likewise the transient keyword indicates
Keyword- transient
the object is archived. At that time, the transient marker is ignored by the Java runtime system.  we use transient in a class or instance variable declaration... Keyword- transient      
transient keyword
Friend, The transient keyword is used to indicate that the member variable should not be serialized when the class instance containing that transient variable... as transient, then that variable will not be persisted. Thanks
Java variable
Java variable   To what value is a variable of the String type automatically initialized
Converting jsp variable to java variable
Converting jsp variable to java variable  Hi how to convert java script variable to java variable on same jsp page
Core Java Interview Questions!
Core Java Interview Questions       Question: What is transient variable? Answer: Transient variable can't be serialize. For example if a variable is declared
What is instance variable in Java?
What is instance variable in Java?  Hi, What is instance variable in Java? What is the use of instance variable? Thanks   Hi, In Java programming classes are used as base of Object oriented programming. Any variable
Java Final Variable
Java Final Variable  I have some confusion --Final variable has single copy for each object so can we access final variable through class name,or it is necessary to create object for accessing final variable
Store Variable in Java
Store Variable in Java  How to store Variables in Java?   public class DoubleTest { public static void main(String[] args) { double...(aDouble); // Outputs 7.21 } }   Variable in Java
array variable in a java program
array variable in a java program  How do i write a program that will prompt the user for a list of 5 prices, that cosist of the sum of all the prices, the average of the prices, and all prices that are higher than the calculated
Instance variable in java
Instance variable in java In this section you will learn about Instance variable in java. In java all variable must be declared before they are used... kind of variable in java, they are as follows : Local variable Instance
K - Java Glossary
K - Java Glossary       Keyword- transient The transient keyword is used to indicate to the JVM that the indicated variable is not part of the persistent state
Transient and detached objects
Transient and detached objects  Explain the difference between transient (i.e. newly instantiated) and detached objects in hibernate
How to define a constant variable in Java?
How to define a constant variable in Java?   Hi, How to define a constant variable in Java? thanks   HI, The Constants variables... once its declared. For more related to constant variable in java Thanks
Referance variable - Java Interview Questions
Referance variable  by using which reference variable we declare instance variable as local variable in java   Hi friend,Local variables... variable and parameter. When the method is called, the parameter slots are initialized
Static variable in java
Static variable in java. Static is a keyword in java used to create static methods, variable inside a class and static class. Static variable is also called class variable which belongs to class not to object. Static
Java struts variable valu - Struts
Java struts variable valu  Hii.. can u suggest me how to declare a variable in my jsp page and then fetching its value in the action class.. my requirement is to execute a block of code depending on the value of the variable
Getting environment variable value from java
Getting environment variable value from java  Getting environment variable value from java
Passing a java property to a javascript variable
Passing a java property to a javascript variable  i want to assign a java property to a js variable: action class: collegename have a property.../javascript"); %> var collegename = ''; Java Script code: alert("collegename
o.a.h.h.z.RecoverableZooKeeper - Possibly transient ZooKeeper, quorum=
o.a.h.h.z.RecoverableZooKeeper - Possibly transient ZooKeeper, quorum=  Hi, I am getting the following error while connecting to remote HBase server from Java program: o.a.h.h.z.RecoverableZooKeeper - Possibly transient
Using a variable filename - Java Beginners
Using a variable filename  Dear sir, my program a JFrame containes of 3 JTextFields and 2 different JButtons intend to sends data to 2 Input files... the buttons global variable and using the code e.getSource()== or by associating
Dynamic variable in java - Java Interview Questions
Dynamic variable in java  My interview asked what is dynamic variable in java and where we use them.   Hi Friend, The variables that are initialized at run time is called as dynamic variable.You can use it anywhere
Local Variable and Instant Variable
they compile fine. But in the case of local variable in Java, local variable in Java do...Local Variable and Instant Variable  difference between Local Variable and Instant Variable   Difference between local variable
SCJP Module-11 Question-5
; public String address; 6    public transient int ccode; } What will be the effect of line no-6 ? Choose the correct option? (A) A transient variable is a variable that are not serialized.(B) A transient variable
convert javascript var to java variable - JSP-Servlet
convert javascript var to java variable  hi how to conver javascript var to java variable?  Hi Friend, We are providing you two ways: 1)a.jsp: function call(){ var name = "roseindia
create and use an array variable in a java program
create and use an array variable in a java program  how do i write a program that will prompt the user for a list of 5 prices, once the user has entered all values , your program should compute and display the following: The sum
Serialize the static variable
Serialize the static variable  hello, Can we serialize the static variable?   hiiADS_TO_REPLACE_1 Yes we can serialize the static variable. if u don't want to serialize, u need to declare the variable as transient
count statement that saves results on a variable in a java bean
count statement that saves results on a variable in a java bean  Hello i want to ask you where is the problem and my programme give me only null returns ---> package javalab; import java.sql.*; public class History
count statement that saves results on a variable in a java bean
count statement that saves results on a variable in a java bean  Hello i want to ask you where is the problem and my programme give me only null returns ---> package javalab; import java.sql.*; public class History
java basics
java basics  What is the use of transient keyword?  The transient keyword is applicable to the member variables of a class. The transient... when the class instance containing that transient variable is needed
Get Environment Variable Java
Get Environment Variable Java       In this example we are getting environment variable. To get...;java EnvironmentInformation Variable Name Variable Values USERPROFILE C
environment variable
environment variable  what is environment variable in java?   Environment variables are used by the Operating System to pass configuration information to applications
How to do Null validation for a boolean variable - Java Beginners
How to do Null validation for a boolean variable  How to do Null validation for a boolean variable in JAVA?  Hi friend, For solving the problem visit to : http://www.roseindia.net/java/master-java/variables
Static Variable
Static Variable  What is the basic use of introducing static variable type in java?Please explain clearly....   The Static means that a certain object/variable is resident in memory and accessed each time an instance
How to pass variable from one class to another in java
How to pass variable from one class to another in java  How to pass variable from one class to another in java?   Example: public class... and variable through by calling Class1 getter methods
Pointer a variable
Pointer a variable  hii, Pointer is a variable or not ?   hello,ADS_TO_REPLACE_1 Yes, a pointer is a variable
how to inherit static variable
how to inherit static variable   how to inherit static variable or methods in Java?? Please explain the entire process of inheriting the variable. Thanks in advance
Passing variable
Passing variable  How to pass variable to HTTP object in HTMl or PHP
How I get a variable from java script to use it in the scriptlet of jsp.
How I get a variable from java script to use it in the scriptlet of jsp.  Hi i want to get the tinyUrl value in the scriptlet of jsp. // Bit.ly API var url="http://cplive.com/dealDetail.do?method=displayDealDetail&
Local Variable ,Package & import
Local Variable ,Package & import A local variable has a local scope.Such a variable is accessible only from the function or block in which it is declared. Example of Local variable : The class variable are declared in the class
How to extract the values of a variable in a href statement. - Java Beginners
How to extract the values of a variable in a href statement.  Hi, Here im trying to send invitations to some selected people.It is working when i...: SENDINVITE Now here i want to put a variable containing multiple e-mail ids
final variable
final variable  Please give some easiest and understanding example program for final variable
environment variable
environment variable  what are the environment variable is need to run j2ee application in eclipse could you explain the details

Ads