Text file into Java List using Commons or Guava

前端 未结 7 633
灰色年华
灰色年华 2021-01-08 01:18

What is the most elegant way to put each line of text (from the text file) into LinkedList (as String object) or some other collection, using Commons or Guava libraries.

7条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-08 01:52

    This is probably what youre looking for

    FileUtils.readLines(File file)

提交回复
热议问题