Transient

in one of my classes in using a desktop object, when i run my app it gives me a java.io.NotSerializableException: java.awt.Desktop exception. but when i set my desktop object toprivatetransient Desktop desktop

then i doesnt give me this error anymore. what exactly does transient do? and am i using it correctly?

thnx guys

[410 byte] By [Alex1989a] at [2007-11-27 2:39:01]
# 1
Transient means that field won't be serialized. So if a non-serializable field is not marked transient, you get that error.Obviously, since transient variables aren't serialized, you have to be able to reconstruct their state after deserialization.
jverda at 2007-7-12 3:00:38 > top of Java-index,Core,Core APIs...