为什么我用RandomAccessFile()类下的writeInt()方法写入后 文件中出现的不是数字 而是方块??
package com.sun;
import java.io.IOException;
import java.io.RandomAccessFile;
public class IntDemo {
public static void main(String[] args) throws IOException {
RandomAccessFile raf = new RandomAccessFile("e:\\demo.txt","rw");
for(int i = 0;i<10;i++){
try{
raf.writeInt(i);
}
catch(IOException e){
e.printStackTrace();
}
}
}
}