'I am trying to read all lines in a file and if there are duplicates, concatenate them. Here is what I have so far

import java.io.File;
import java.util.List;


public final class ProblemSG3Implementation {
    public final List<String> readEntries(final File psfFile) {
    enter code here
        for (final File fileId : psfFile.listFiles()) {
            if (fileId.isDirectory()) {
                readEntries(fileId);
            } else {
                System.out.println("No files exist");
            }

        }
        return null;
    }
}


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source