2

我可以使用以下代码读取 csv 文件,

Reader inRead = new FileReader("testfile.csv");
Iterable<CSVRecord> records = CSVFormat.EXCEL.parse(inRead);
for (CSVRecord record : records) {
    String lastName = record.get("Name");
}

但是,我想在姓氏后面加上“ABC”并更新同一个文件。有没有办法做到这一点?

4

0 回答 0