package com.yiibai;import java.io.*;import java.util.Calendar;public class ObjectStreamFieldDemo {public static void main(String[] args) {
编程学习网为您整理以下代码实例,主要实现:Java.io.ObjectStreamField.toString()方法,希望可以帮到各位朋友。
package com.yiibai;
import java.io.*;
import java.util.Calendar;
public class ObjectStreamFIEldDemo {
public static voID main(String[] args) {
// create a new object stream class for Integers
ObjectStreamClass osc = ObjectStreamClass.lookup(Integer.class);
// get the fIEld value from Integer class
ObjectStreamFIEld fIEld = osc.getFIEld("value");
// print fIEld as a string
System.out.println("" + fIEld.toString());
// create a new object stream class for calendar
ObjectStreamClass osc2 = ObjectStreamClass.lookup(Calendar.class);
// get the fIEld value from Integer class
ObjectStreamFIEld fIEld2 = osc2.getFIEld("isSet");
// print fIEld as a string
System.out.println("" + fIEld2.toString());
}
}
沃梦达教程
本文标题为:Java.io.ObjectStreamField.toString()方法
猜你喜欢
- Java Lambda表达式示例 1970-01-01
- java.util.zip.Inflater.read()方法 1970-01-01
- Java.io.ObjectStreamField.toString()方法 1970-01-01
- Java8示例程序 1970-01-01
- JAVA通过正则匹配html里面body标签的内容 2022-10-25
- 整数类型 1970-01-01
- Java.io.ObjectStreamField.isUnshared()方法 1970-01-01
- Hello World示例 1970-01-01
- Java方法引用示例 1970-01-01