Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

use of randomaccessfile() in java

// Create a random access file object. 	
     RandomAccessFile file = new RandomAccessFile("myfile.dat", "rw");
// Writing to the file.
     file.writeChar('S');
// Moving file pointer to the beginning. 
    file.seek(0);   
// Reading data from the file.
     System.out.println(file.readChar());
Source by www.scientecheasy.com #
 
PREVIOUS NEXT
Tagged: #java
ADD COMMENT
Topic
Name
9+1 =