xxxxxxxxxx
Import java. io. IOException; import java. nio. charset. standardCharsets; import java. nio. file. files; import java. nio. file. paths; public class Java8FileReader {public static void main (String [] args) throws IOException {// Java8 reads Files in streaming mode, making Files more efficient. lines (Paths. get ("D: \ jd.txt"), StandardCharsets. UTF_8 ). forEach (System. out: println );}}