Hi madhu,
Hi friends I don't know how to use where to use and how to use
transient keyword in threads concept plz give me answer with small
example.
In common you use it with serialization and lazy loading. Here's a short
example:
class Name implements Serializable {
private String firstName;
private String secondName;
private transient String fullName = null;
public Name(){
}
public Name(String firstName, String secondName){
this.firstName = firstName;
this.secondName = secondName;
}
public String getFullName(){
if(fullName == null){
fullName = firstName + " " + secondName;
}
return fullName;
}
}
When you send an instance of this object "over the wire" then the fullName
member will not be transmited, but it will be generated on the first call
of the getFullName method.
Greetings,
Markus