16 20 Output Given Dguster Eros Oldhome Javaclasss Cat Simplerandomaccessfile2 Java Import Q37035420

16-20. What is the output from the above? Given: dguster@eros:/OLDHOME/javaclassS cat SimpleRandomAccessFile2 java import jav16-20. What is the output from the above? Given: dguster@eros:/OLDHOME/javaclassS cat SimpleRandomAccessFile2 java import java.io.*; public class SimpleRandomAccessFile2 public static void main(String[) args) throws IOException ( RandomAccessFile inout- new RandomAccessFile(“inout3.dat”, rwd inout.setLength(0); for (int i = 2; i < 6; i++) inout.writeShort(i) System.out.printin”Current file length isHäu?+inout.lengthO) inout.seek( 1 ◆2); System.out.printin(“The second number is?@”+ inout.readShort): inout.seek(3 2); System.out.println”The fourth number is? +inout.readShortO) 沆nout.seek(8.2); //System.out.println( The ninth number is”+ inout.readShortO): inout.writeShort(12); inout.seek(inout.lengthO) inout.writeShort(5); System.out.printin(“The new length is”+inout.lengthO); 90 Winout.seek(9 2) //System.out.println(“The tenth number is”+ inout.readShortO):

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.