Showing posts with label Serialization. Show all posts
Showing posts with label Serialization. Show all posts

Thursday, May 29, 2008

Serialization

1.What class can be serialized? What cannot?

A: Almost all JDK classes are serializable except

  • Classes with only static and/or transient fields. For example, Math, Arrays, etc.

  • Classes representing specifics of a virtual machine. For example, Thread, Process, Runtime, almost all classes in the java.io and many classes in java.net packages are not serializable