lecture24 - PIC 20A Lecture 24 Object Serialization Threads...

Info icon This preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
PIC 20A Lecture 24: Object Serialization, Threads, Multithreading, javax.swing.Timer
Image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
What is object serialization? the process of saving objects to a stream it is called serialization because each object is assigned a serial number on the stream if the same object is saved twice, only the serial number is written out the second time when objects are read back in, duplicate serial numbers are restored as references to the same object
Image of page 2
Which objects can be written to an object stream? those whose classes implement the java.io.Serializable interface • the Serializable interface has no methods the object's direct superclass must have a non- private default constructor in order for the object's inherited public , protected and package access fields to be serialized and deserialized (else you will get a runtime error)
Image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon