站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JDK 5 Documentation v1.2.2, Java 2 SDK 英文文档

Using Serialization with a NonSerializable Superclass - JDK 5 Documentation v1.2.2, Java 2 SDK 英文文档

Using Serialization with a NonSerializable Superclass

Running the Example

Complete the following procedure to compile and run the two examples:

  1. From yourbasedir/objectserializationexamples/NonSerializableSuperClass, compile the files using JDKTM 1.1 or higher:
      javac NonSerialSuperExample.java
      javac Book.java
      javac ReadingMaterial.java
    
  2. Run the compiled file:
      java NonSerialSuperExample
    

The book object prints out before and after serialization.

Additional Information:

Abstract
Sources
List of Examples