loadstringbuffer.java
来自「Developing Games in Java 源代码」· Java 代码 · 共 27 行
JAVA
27 行
import java.io.*;
class LoadStringBuffer {
public static void main (String[] args) {
StringBuffer sb = null;
try {
FileInputStream fis = new FileInputStream("sb.ser");
ObjectInputStream ois = new ObjectInputStream(fis);
sb = (StringBuffer) ois.readObject();
ois.close();
} catch (IOException ioException) {
System.out.println(ioException);
} catch (ClassNotFoundException classNotFoundException ) {
System.out.println(classNotFoundException );
}
System.out.println("Welcome back aboard, Sir! : " + sb);
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?