user470143
user470143

Reputation: 49

Random Access of file

Input = Line number.

Output = Replace the line at given line number by new line.

example =

a.txt

aaaa
bbbb
cccc

input= line number=3 replace with dddd

output

aaaa
bbbb
dddd

Upvotes: 0

Views: 209

Answers (1)

Bozho
Bozho

Reputation: 597432

Take a look at this tutorial and java.io.RandomAccessFile

Upvotes: 2

Related Questions