SyntaxFix
Write A Post
Hire A Developer
Questions
You can read file data line by line as below:
String fileLoc = "fileLocationInTheDisk"; List<String> lines = Files.lines(Path.of(fileLoc), StandardCharsets.UTF_8).collect(Collectors.toList());