initial commit

This commit is contained in:
2020-06-17 16:57:37 -05:00
parent 0daafbe767
commit 4a1cf74066

View File

@@ -0,0 +1,22 @@
package Sorting;
import java.util.ArrayList;
import java.lang.Integer;
import java.nio.file.Files;
import java.nio.file.Path;
import java.io.BufferedReader;
import java.io.IOException;
public class RandomWordFileReader {
private ArrayList<String> words = new ArrayList<String>();
public RandomWordFileReader(String filename){
try(BufferedReader reader = Files.newBufferedReader(Path.of(file));){
reader.lines().forEach(word -> words.add(word));
}catch (IOException ex){
System.err.println(ex);
}
}
}