Java.io.ObjectStreamClass.toString() 方法 Java.io.ObjectStreamClass.lookupAny() 方法 Java.io.ObjectStreamField.compareTo() 方法 Java.io.ObjectStreamClass.toString() 方法 package com.codingdict; import java.io.*; import java.util.Calendar; public class ObjectStreamClassDemo { public static void main(String[] args) { // create a new object stream class for Integers ObjectStreamClass osc = ObjectStreamClass.lookupAny(Integer.class); // print the object as a string System.out.println("" + osc.toString()); // create a new object stream class for Calendars ObjectStreamClass osc2 = ObjectStreamClass.lookup(Calendar.class); // print the object as a string System.out.println("" + osc2.toString()); } } Java.io.ObjectStreamClass.lookupAny() 方法 Java.io.ObjectStreamField.compareTo() 方法