posted 23 years ago
The transient modifier is used to optimise serializable objects. Say you have a class that has lot of class scope variables. Now you want to write the class to disk (to save a users preferences or something). Perhaps one the class level variables is a big array that you don't want/need to save. Simply declare this variable as 'transient' and when the class is serialized, the transient variable will be ignored. Hope this clears things up.
Sean