开发者

Random Access of file

开发者 https://www.devze.com 2023-01-19 15:25 出处:网络
Input = Line number. Outpu开发者_运维技巧t = Replace the line at given line number by new line.

Input = Line number.

Outpu开发者_运维技巧t = 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


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

0

精彩评论

暂无评论...
验证码 换一张
取 消