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




Have Programming Question? Ask it here!
 
 
 


Sirish
Java code
1 Answer(s)      5 years and 6 months ago
Posted in : Java Beginners



Advertisement
View Answers

March 12, 2009 at 4:46 AM


Hi friend,

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;
}

Volatile:

Volatile modifier applies to variables only and it tells the compiler that the variable modified by
volatile can be changed unexpectedly by other parts of the program.These variable is not allowed to have
a local copy of a variable that is different from the value currently held in "main" memory.

For read more information on Keyword visit to :

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

Thanks


Related Tutorials/Questions & Answers:
JAVA code For
JAVA code For   JAVA code For "Traffic signals Identification for vehicles
java code
java code  write a java code to convert hindi to english using arrays
Advertisements
JAVA CODE
JAVA CODE  JAVA SOURCE CODE TO BLOCK A PARTICULAR WEB SITES(SOCIAL WEB SITE
java code
java code  what is the code to turn off my pc through java program
java code
java code  hi any one please tell me the java code to access any link i mean which method of which class is used to open any link in java program
java code
java code  sir how to merge the cells in excel using java code please help me and also how to make the text placed in the cell to be center
java code
java code  sir how to merge the cells in excel using java code please help me and also how to make the text placed in the cell to be center
java code
java code  write a java code for finding a string in partiular position in a delimited text file and replace the word with the values given by user and write the file in new location
java code
java code  need java code for chart or graph which compare the performance of aprior algorithm and coherent rule algorithm.plz any one help me out
java code
java code  I need the java code that would output the following: HARDWARE ITEMS CODE DESCRIPTION UNIT PRICE K16 Wood screws,brass,20mm $7.75 D24 Wood glue,clear,1 liter $5.50 M93
Java code
Java code   Create a washing machine class with methods as switchOn, acceptClothes, acceptDetergent, switchOff. acceptClothes accepts the noofClothes as argument & returns the noofClothes
java code
java code  develop a banking system in java
java code
java code  HOW TO PRINT 1 TO 100 WITHOUT USING CONDITIONAL,ANY LOOP AND ARRAY IN JAVA AND C.URGENT SIR PLZ  Hi, You can use following code: class MyClass { public static void main(String[] args) { int
java code
java code  how to extract html tags using java
Java code
Java code  Write a program which performs to raise a number to a power and returns the value. Provide a behavior to the program so as to accept any... the following code: import java.util.*; import java.text.*; class NumberProgram
java code
java code  int g() { System.out.println("Inside method g"); int h() { System.out.println("Inside method h"); } } Find the error in the following... cannot define a method inside another method. Anyways, we have modified your code
java code
java code  what is meaning bufferedreader
java code
java code  what is meaning bufferedreader
Java code
Java code  An old-style movie theater has a simple profit program. Each customer pays $5 per ticket. Every performance costs the theater $20, plus...; Hi Friend, Try the following code: import java.util.*; import
Java code
Java code   Create a calculator class which will have methods add, multiply, divide & subtract   Hi Friend, Try the following code: class Calculation{ public int add(int a,int b){ return a+b
java code
java code  i want HSVcolor descriptor for color image in java coding
java code
java code  hi, Can any one tell me " How to read the data which is present om an image in java
Java Code
Java Code  Write a java program, which creates multiple threads. Each thread performs add/delete/update operations on an ArrayList simultaneously
java code
java code  I am beginer in java my question is how can i fill data from mysql database to jcombobox using netbeans
Java code
Java code  Create a class called Student which has the following methods: i. Average: which would accept marks of 3 examinations & return... & returns the name.   Hi Friend, Try the following code: import
Java code
Java code  Create a Bank class with methods deposit & withdraw. The deposit method would accept attributes amount & balance & returns....   Hi Friend, Try the following code: import javax.swing.*; class
Java code
Java code   Create an Employee class which has methods netSalary which would accept salary & tax as arguments & returns the netSalary which... the following code: import java.util.*; class Employee { static Scanner input=new
java code
java code  An employee _id consist of 5 digits is stored in a string variable strEmpid. Now Mr.Deb wants to store this Id in Integer type to IntEmpid. write Java statements to do
java code
java code  input any word ie risk,resul is-- r ri ris risk
java code
java code  Create a calculator class which will have methods add, multiply, divide & subtract
java code
java code   Develop a program that accepts the area of a square and will calculate its perimeter
java code
java code  Write a program to find the difference between sum of the squares and the square of the sums of n numbers
Java code
Java code  Create Book having following attributes: Book ID, Title, Author and Price. Create Periodical which has the following additional attributes... Friend, Try the following code: import java.util.*; class Book{ int id
java code
java code  java database code to retrieve data at runtime and please... language="java"%> <%@page import="java.sql.*"%> <form method="post... e){} %>   If you want the application Java Swing then Visit
java code
java code  Create a washing machine class with methods as switchOn, acceptClothes, acceptDetergent, switchOff. acceptClothes accepts the noofClothes as argument & returns the noofClothes
java code
java code  Develop the program calculateCylinderArea, which accepts radius of the cylinder's base disk and its height and computes surface area of the cylinder
java code
java code  Develop the program calculateCylinderVolume., which accepts radius of a cylinder's base disk and its height and computes the volume of the cylinder
java code
java code  Develop a program that computes the distance a boat travels across a river, given the width of the river, the boat's speed perpendicular to the river, and the river's speed. Speed is distance/time, and the Pythagorean
Java code
Java code  Develop the program calculatePipeArea. It computes the surface area of a pipe, which is an open cylinder. The program accpets three values: the pipes inner radius, its length, and the thickness of its wall
java code
java code  Write a program which performs to raise a number to a power and returns the value. Provide a behavior to the program so as to accept any type of numeric values and returns the results
java code
java code   Develop a program that computes the distance a boat travels across a river, given the width of the river, the boat's speed perpendicular to the river, and the river's speed. Speed is distance/time, and the Pythagorean
Java code
Java code  hi, please suggest me how to extract table name and find the no of select statement and insert statement from a file and dispaly the result of SELECT and INSERT tablewise i.e. abc_table SELECT 4 pgm_table
Java code
Java code  Develop the program calculateHeight, which computes the height that a rocket reaches in a given amount of time. If the rocket accelerates at a constant rate g, it reaches a speed of g ā?¢ t in t time units and a height
Java code
Java code  Create Product having following attributes: Product ID, Name, Category ID and UnitPrice. Create ElectricalProduct having the following additional attributes: VoltageRange and Wattage. Add a behavior to change
Java code
Java code   Create Vehicle having following attributes: Vehicle No., Model, Manufacturer and Color. Create truck which has the following additional attributes:loading capacity( 100 tonsā?¦).Add a behavior to change the color
java code
java code  Create an Employee class which has methods netSalary which would accept salary & tax as arguments & returns the netSalary which is tax deducted from the salary. Also it has a method grade which would accept
java code
java code  Create Product having following attributes: Product ID, Name, Category ID and UnitPrice. Create ElectricalProduct having the following additional attributes: VoltageRange and Wattage. Add a behavior to change
java code
java code  Create Book having following attributes: Book ID, Title, Author and Price. Create Periodical which has the following additional attributes: Period (weekly, monthly etc...) .Add a behavior to modify the Price
java code
java code  Create Vehicle having following attributes: Vehicle No., Model, Manufacturer and Color. Create truck which has the following additional attributes:loading capacity( 100 tonsā?¦).Add a behavior to change the color
java code
java code  Develop a program that accepts an initial amount of money (called the principal), a simple annual interest rate, and a number of months will compute the balance at the end of that time. Assume that no additional
Advertisements
 

 

 

DMCA.com