📄 testobjectoutput.java
字号:
import java.io.*;
public class TestObjectOutput{
public static void main(String args[]){
try{
FileOutputStream s1 = new FileOutputStream("3.txt");
ObjectOutputStream os = new ObjectOutputStream(s1);
int a = 23;
double d = 78.99;
os.writeObject("hello");
os.writeInt(a);
os.writeDouble(d);
os.flush();
os.close();
}catch(Exception e){}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -