1. 476.
    0
    okunacak.
    ···
  2. 477.
    0
    reserved
    ···
  3. 478.
    0
    public class DelLstLine{
    public static void main(String[] arg){
    try{
    RandomAccessFile raf = new RandomAccessFile("RandFile.txt", "rw");
    long length = raf. length();
    System.out. println("File Length="+raf. length());
    //supposing that last line is of 8
    raf. setLength(length - 8);
    System.out. println("File Length="+raf. length());
    raf. close();
    }catch(Exception ex){
    ex.printStackTrace();
    }
    }//end of psvm
    }//class ends
    ···
  4. 479.
    0
    okuncak
    ···