public static void main(String[] args) { try { // 文件流甚是牛逼 Stream<String> stream = Files.lines(Paths.get("pom.xml")); stream.forEach(System.out::println); } catch (IOException e) { e.printStackTrace(); } }
public static void main(String[] args) { try { // 文件流甚是牛逼 Stream<String> stream = Files.lines(Paths.get("pom.xml")); stream.forEach(System.out::println); } catch (IOException e) { e.printStackTrace(); } }