Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Java-Beginners java Transient variable
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


Sing S
java Transient variable
1 Answer(s)      5 years and 10 months ago
Posted in : Java Beginners



Advertisement
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... from getting converted, one must declare the variable Transient keyword
transient variables in java
transient variables in java  hello, What are transient variables in java?   hii, 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...? Transient keyword provide you a control on serialization process in java and allow
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... into the persistent but if the variable is declared as transient
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
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
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
Transient and detached objects
Transient and detached objects  Explain the difference between transient (i.e. newly instantiated) and detached objects in hibernate
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
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
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... is one of the data type in java ,identifier is one of the name of the variable
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
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
Getting environment variable value from java
Getting environment variable value from java  Getting environment variable value from java
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
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?   hii Yes we can serialize the static variable. if u don't want to serialize, u need to declare the variable as transient
 

 

 

DMCA.com