📄 debug8_4.java
字号:
package questions.c8;
import java.io.*;
public class Debug8_4 {
private static final String FILE_NAME
= "debug8_4.ser";
int count = 11;
Thread t = new Thread();
String title = "Placeholder";
public static void main( String[] args ) {
try {
File objectFile = new File( FILE_NAME );
Debug8_4 x = new Debug8_4();
x.count = 57;
x.title = "Varieties";
FileOutputStream fos =
new FileOutputStream( objectFile );
ObjectOutputStream oos =
new ObjectOutputStream( fos );
oos.writeObject( x );
oos.close();
FileInputStream fis =
new FileInputStream( objectFile );
ObjectInputStream ois
= new ObjectInputStream( fis );
Debug8_4 retrieved
= (Debug8_4) ois.readObject();
ois.close();
System.out.println( retrieved.count );
System.out.println( retrieved.title );
}
catch ( Exception x ) {
System.out.println( x );
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -