import java.io.*;
public class lapore
{
public static void main(
String[]args)throws IOException
{
RandomAccessFile file=new RandomAccessFile("test.txt","rw");
file.writeBoolean(true);
file.writeInt(12345);
file.writeInt(7890);
file.writeLong(1000000);
file.writeInt(777);
file.writeFloat(.001f);
file.seek(5);
System.out.println(file.readInt());
file.close();
}
}
Why the above given code is throwing an answer 7890, why not 777, please throw some light on it.?